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

  • I looked in the map file and saw that the value of this pointer was 0x002000A8...


    Actually, the address of the pointer is 0x002000A8, not the *value* of the pointer.

    Am I correct in thinking that I should be able to see RAM location 0x002000A8 change in a memory window when I assign a value to the pointer as shown below?

    char *ptr; // map file shows this var @ 0x002000A8
    const char string[] = "testing 123";
    ...
    ptr = string;
    

Reply

  • I looked in the map file and saw that the value of this pointer was 0x002000A8...


    Actually, the address of the pointer is 0x002000A8, not the *value* of the pointer.

    Am I correct in thinking that I should be able to see RAM location 0x002000A8 change in a memory window when I assign a value to the pointer as shown below?

    char *ptr; // map file shows this var @ 0x002000A8
    const char string[] = "testing 123";
    ...
    ptr = string;
    

Children
More questions in this forum