Add Condition to Watch the Memory Address in VC90

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!
 
S

SvenC

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.
 
E

Ed

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top