pointer break points
-
Hello, If I have the following code,
#include <iostream> int main() { int y = 6; int *ptr; ptr = &y; int x = 7; ptr = &x; x = 8; std::cout << "hi"; std::cout << "hello"; return 0; }
is there a way to somehow change the break point properties so that it will stop where ptr changes from &y to &x ? The reason I wish to know this is lets say I have a massive call stack and somewhere in there my pointer is modified, I wish to locate this position in the stack then by setting a break point where the properties of my pointer change. The platform I am using is visual studio .NET. I believe it is possible to do this in visual studion 6 C++ but I am unsure how to do this in visual studio .NET. Thanks for any input. -
Hello, If I have the following code,
#include <iostream> int main() { int y = 6; int *ptr; ptr = &y; int x = 7; ptr = &x; x = 8; std::cout << "hi"; std::cout << "hello"; return 0; }
is there a way to somehow change the break point properties so that it will stop where ptr changes from &y to &x ? The reason I wish to know this is lets say I have a massive call stack and somewhere in there my pointer is modified, I wish to locate this position in the stack then by setting a break point where the properties of my pointer change. The platform I am using is visual studio .NET. I believe it is possible to do this in visual studion 6 C++ but I am unsure how to do this in visual studio .NET. Thanks for any input.yes, place a "conditional breakpoint" instead. on that breapoint, check it's breaking condition, and add the values to test...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]