Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I am debugging using visual studio 2010.
Programming in C.
I want to break when a memory address has changed. It means, I have a memory address, which can be changed in hundreds of places in the code. I want to find the place in the code when it is actually changed. How can I do it?

Thanks
Posted
Updated 10-Sep-13 3:06am
v2

I guess the Data Breakpoint[^] is what you are looking for, but I never used it, so I don't know how it exactly works.
 
Share this answer
 
Comments
H.Brydon 10-Sep-13 23:59pm    
I've used this technique and it works fine (+5). This requires setting the address manually, and it disappears at the end of the debug session. To make this more persistent, establish a reference or non-void pointer at the memory address in question (programmatically or manually) and set a watch point on the variable.
CPallini 11-Sep-13 1:53am    
Thank you very much. Interesting.
I'm not sure if this is exactly what you want, but you can use the Watch feature[^] to check when a variable changes.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900