While debugging Windows application, I wanted to find out if it is possible to locate symbols at a given memory location (and how). This will be the reverse operation of typing a symbol in the "Memory" window, which will translate the symbol to its address. But not the other way around.
It is super easy on VxWorks shell, and possible with Linux gdb. Should be possible on VS.
Thanks.
In Visual Studio, open Tools > Options > Debugging > Symbols (or Debug > Options > Symbols).
To get the address do the following: Start debugging your app (or with a dump, after clicking Debug with Managed Code) Go to Debug > Windows > Memory, select Memory 1, Memory 2, Memory 3, or Memory 4 (Community version only has one Memory window).
Begin code stepping by selecting F10 or F11. Doing so allows you to quickly find the entry point of your app. You can then continue to press step commands to navigate through the code. Run to a specific location or function, for example, by setting a breakpoint and starting your app.
If you are lucky and you know the exact address, but do not know the symbol name, try to write the address into the Watch window, and the VS will find the symbol. E.g.
(void *)0x6F63E248 -> 0x6f63e248 {My.dll!TMyString<char,CMyMemHeap> *s_psMyAppNameAbbr} void *
When using windbg to debug, command "ln Address" will help you check the symbols near the target address, hope that will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With