Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28595 Discussions

Q re data breakpoints and variable size

WSinc
New Contributor I
340 Views
Hello -

I noticed when I debug a program,
when I set a DATA breakpointpoint, it
wants to know how many bytes are involved.

The defauly apparently is 4, since it does not seem to know how big the variable
is. How does that work?

Does it test all the bytes to see if ANY of them changed value?

Why can't I set it to the right value for Integer*8 or Real*16 variables?
0 Kudos
3 Replies
mecej4
Honored Contributor III
340 Views
The seemingly odd restrictions are related to the architecture of the hardware debug registers of the i386 architecture. See, for example, this Web page .

Without hardware support, data breakpoints would be prohibitively cycle-consuming to implement.
0 Kudos
WSinc
New Contributor I
340 Views
So, is there a way to debuf integer*1 or integer*2, or even real*8 variables?

It isn;t clear that a given PC has an 80386 CPU. Does that web page also apply to OTHER cpus?

I will print it out and have a look.
0 Kudos
Steven_L_Intel1
Employee
340 Views
You are certainly not using an 80386 CPU from the 1980s. But the fact remains that data breakpoints under 32-bit Windows are limited to 32-bits (four bytes) or less. Yes, you can break on two and one-byte values.

For a 64-bit application, you can set a data breakpoint on a 64-bit (8-byte) value.
0 Kudos
Reply