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
  • Okay, now I'm really confuzed !!

    I decided to add one more thing to the watch window, the address of the pointer, as shown below.

    &ptr

    The value that shows up for '&ptr' does not match what's in the map file, however... I can use the 'D' command in the debugger to display the memory at that location, and it appears to be the location in memory that's getting written to when I write to that pointer (as in the previous example posted to this thread)! And... the value in the memory window appears to track these assignments perfectly too.

    So... why does using the debugger to show the address of a pointer not match what's in the map file...?

Reply
  • Okay, now I'm really confuzed !!

    I decided to add one more thing to the watch window, the address of the pointer, as shown below.

    &ptr

    The value that shows up for '&ptr' does not match what's in the map file, however... I can use the 'D' command in the debugger to display the memory at that location, and it appears to be the location in memory that's getting written to when I write to that pointer (as in the previous example posted to this thread)! And... the value in the memory window appears to track these assignments perfectly too.

    So... why does using the debugger to show the address of a pointer not match what's in the map file...?

Children