Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Call Stack address to source code line capability
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

khirata7169
New Member

3 Posts

Posted - Apr 07 2023 :  12:26:11 PM  Show Profile  Reply with Quote
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
18939 Posts

Posted - Apr 11 2023 :  10:48:39 AM  Show Profile  Reply with Quote
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
Go to Top of Page

khirata7169
New Member

3 Posts

Posted - Apr 11 2023 :  12:04:20 PM  Show Profile  Reply with Quote
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)".
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 12 2023 :  11:23:49 AM  Show Profile  Reply with Quote
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
Go to Top of Page

khirata7169
New Member

3 Posts

Posted - Apr 12 2023 :  12:50:21 PM  Show Profile  Reply with Quote
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
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 14 2023 :  08:03:57 AM  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000