Show Stack content (not stack call) at visual stud

2020-02-28 20:29发布

问题:

How i can view Stack content (not stack call) at visual studio 2013?


view to where ESP is pointing and below. show content at char.

Thanks for the help.

回答1:

The other answer is correct for 32-bit code, however it is only "half-correct" for 64-bit code.

If you really want to see the memory at esp, then you can enter esp in the Address input box in the Memory debug window.

However, this is probably not what you want for 64-bit code. The stack is at rsp not esp.

If you enter rsp into the Address input textbox in the Memory debug window then you will see the stack memory. If you enter esp into the Address input textbox then you will see the memory at (rsp & 0x00000000ffffffff), which is probably not what you want.



回答2:

You can do this by going to Debug > Windows > Registers, get the location of ESP, and then enter this address in a Debug > Windows > Memory window. However, that will only give you the raw memory.

As OwenWengerd points out in the comments, you can simply type ESP in the address field if you're debugging native code. For some reason, this doesn't work for managed code though.