Author |
Topic |
|
khirata7169
New Member
3 Posts |
Posted - Apr 07 2023 : 12:26:11 PM
|
Can VA display the associated source code line given a virtual address? Address Resolver didn't display the source code line when I played around with it.
For example, given a call stack recorded from a production device at a customer site, if I have the virtual address ProgramXX!00007FF71FF8DB54 how can I get "xxx.cpp (1141)" where 1141 is the line number in xxx.cpp source code?
I have ProgramXX's base address, pdb, and source code. Is there anything else I need to map the virtual address to the source code line (if this is possible).
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 11 2023 : 10:48:39 AM
|
Does the address resolver help at all for you?
Are you working in purely C++ or a mixture of C++ and other languages? |
zen is the art of being at one with the two'ness |
|
|
khirata7169
New Member
3 Posts |
Posted - Apr 11 2023 : 12:04:20 PM
|
I using only C++.
No, the address resolver shows something (maybe the C++ template) but doesn't show the source code line associated with the address on the stack. For example when I enter 00007FF71FF8DB54 in the address resolver I get "boost::json::detail::default_resource::operator=" where the actual source code line is "C:\... source_path ...\XXX.cpp (source line 1141)". |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 12 2023 : 11:23:49 AM
|
At the risk of asking a stupid question, do you know that this address should resolve to this line of code? If you do, how did you confirm this? I am trying to work out how to set about testing this here. |
zen is the art of being at one with the two'ness |
|
|
khirata7169
New Member
3 Posts |
Posted - Apr 12 2023 : 12:50:21 PM
|
Yes, I verified this by: 1) Modifying Visual Studio 2022 linker option so the .pdb is looked for in the same folder as the .exe 2) Executing the code with the .exe and .pdb in the same folder 3) Executing the code with only the .exe in the folder 4) Comparing the call stack output of 2) and 3)
This was executed in VS 2022 so the source code was available. Call stack was generated by: 1) Putting stack trace code in the terminate handler 2) Changing the terminate handler to the modified terminate handler 3) calling std::terminate in the code
|
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Apr 14 2023 : 08:03:57 AM
|
Have you entered the correct offset? You seem to know what you are doing here, but this is listed in the documentation as a known reason that you will get the wrong result when searching by the address.
Can you please instead open the window:
VAssistX -> Debug -> PDB Explorer
and then open your .PDB file here, refresh the dialog to get the list of symbols filled in, and then filter it for the function you know is the problem. How does the listed address compare to the address you are checking? |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|