I have been searching for this for a while, but can't find anything useful on the topic: I have a pointer that all of a sudden points to NULL at some point in my program. I'm expecting some other function is accessing wrong memory areas or something like that (though it is always the same pointer that gets set to 0) and I would like to find out what function it is that is changing my pointer, but have no idea where to start. I could log the value of the pointer at the beginning of every function at and the end of the function, but that would be a crazy amount of work, as the project is rather large.
I'm not using c++ but a C-derivate, but the process should be similar...
Hm, yes, watches would work, but the debugger isn't working correctly for me, and the watches also don't tell me what function changed the variable, and since I have probably around 1000 function calls in the time span in which the pointer changes, I still won't know much more, will I?
"You can use a watchpoint to stop execution whenever the value of an expression changes, without having to predict a particular place where this may happen. "