Unable to modify Byte Count in data breakpoint

Unable to modify Byte Count in data breakpoint

I use Data breakpoints to quickly determine where data is changing in a large application. However, this does not reliably work on double precision variables as reported in this thread. Also, if I enter "8" in the Byte Count field of the New Breakpoint dialog (data breakpoint), it is rejected with this message:

"The breakpoint cannot be set. The hardware does not support monitoring the requested number of bytes."

I couldn't find a previous thread on this. Is there any way around this limitation?

Install details:

Intel Visual Fortran Compiler Integration for Microsoft Visual Studio* 2005, 11.1.3470.2005
MS Visual Studio 2005 version 8.0.50727.762 (SP.050727-7600)

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

A bit of web searching tells me that Visual Studio relies on the processor to detect the change and this is limited to 4 bytes. I could not find a way around this limitation.

Retired 12/31/2016

The "Break on data change" is a misnomer, it really is a "Break on address (any of 4 bytes) written to". This includes the contents at the address being written with the same values. Therefore if the variable is a double, then breaking on any byte within the double should be sufficient to trigger the break point. However, note that this will not detect a condition where the variable is written by errant code where a portion of the double is written (e.g. 1or more bytes outside the address specified in the break). When this occures (or you suspect it occures) you may need to set two data break points: one with the BP at the location of the double, and one with the BP at 4 bytes following the start of the double.

The VS debugger may have at one time set multiple data breakpoints (upto 4 x 4-byte) automatically. You may need to do this by hand now.

Jim Dempsey

ok, so let's say that I get the address of a double precision number from loc() in the Immediate window. The number returned is 84561064. If I need to create two data breakpoints to cover the whole real, what's the location of the rest of the representation for this number??

You only need to include any one of the 8 bytes of the double for it to break when that location is written (not necessarily changed).
That said, should this double be in a union with two integer(4)'s, then you will have an issue (missed break) should the break (4-byte) be placed on the double and the 2nd integer written to. It is doubtful that you code would be written as such, however keep it in mind n the event that you are chasing down a dword, word, byte write to the tail end of a double. This is almost always due to bug in program (e.g. index out of range).

Jim Dempsey

Leave a Comment

Please sign in to add a comment. Not a member? Join today