This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using Memory Window in Debugger...

I'm trying to debug a problem where the value of a pointer is being changed when I don't expect it to. I was having trouble getting the debugger to display the value of the pointer in files other than where it was declared, even after I made it a global variable (just to debug the problem). I kept getting a message that it was out of scope.

So... I tried a different approach, and that's what this question's about.

I looked in the map file and saw that the value of this pointer was 0x002000A8, the class was DATA, and the type was '---' (whatever that means). I then started the debugger and entered the value of 0x002000A8 into the Address field of the Memory #1 window. When the code stopped on the breakpoint on the line where I assigned a value to that pointer, the data at the associated memory location did not change. However, the same variable displayed in a watch window did change, and to what I expected.

Is there some trick to getting the memory window to update, to show that the data at that location has indeed changed? Or, am I not understanding how to read the map file and use the memory window to show changing data in RAM?

HELP... (thanks).

Parents
  • YIKES!

    Too dumb!

    I didn't realize that due to an earlier cut/paste I had inadvertently renamed a param passed to the function to the same name as my global var. After fixing that all is well!

    The learning is that whenever the address of a pointer doesn't match what's in the map file, it's probably due to another var with the same name that due to scope rules is being used instead.

    Sigh... (embarrassed)

Reply
  • YIKES!

    Too dumb!

    I didn't realize that due to an earlier cut/paste I had inadvertently renamed a param passed to the function to the same name as my global var. After fixing that all is well!

    The learning is that whenever the address of a pointer doesn't match what's in the map file, it's probably due to another var with the same name that due to scope rules is being used instead.

    Sigh... (embarrassed)

Children