Add Condition to Watch the Memory Address in VC90

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Hi, guys,
In Visual Studio C++ 2008, I can add an item "*(int*)0x00385fa0" in
Watch window to catch the value in that memory address. The value
evaluation is OK.
The question is how can I know when the value in that address was
changed. In the debugging mode, I want the program to be paused autoly
when the value in that address was changed.

In linux gdb, we could use the hardware watch to catch the address,
when give addtional condition to the watch item.

How can I do this in VC studio?

Thanks!
 
Hi Ed,
In Visual Studio C++ 2008, I can add an item "*(int*)0x00385fa0" in
Watch window to catch the value in that memory address. The value
evaluation is OK.
The question is how can I know when the value in that address was
changed. In the debugging mode, I want the program to be paused autoly
when the value in that address was changed.

Choose Debug->New Breakpoint->New Data Breakpoint..
You can specify the address and length of the data to watch for
modifications.

If that does not give you enough control you can also set a breakpoint
with F9 at some line, right click the red break point symbol and specify
filters, conditions and so on.
 
Hi Ed,


Choose Debug->New Breakpoint->New Data Breakpoint..
You can specify the address and length of the data to watch for
modifications.

If that does not give you enough control you can also set a breakpoint
with F9 at some line, right click the red break point symbol and specify
filters, conditions and so on.

Thanks!!!
"New Data Breakpoint" is exactly what I want.
 
Back
Top