Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we distribute the app to users, it won't come with the PBD file bundled due to the size, which means we will not be able to show the debug symbols (such as function name, source file location, line number etc.) in the crash log. And given the fact that current crash log only shows the virtual address of each function call, it's hard to calculate the RVA of the function which will then be used to locate the function using the PBD file.
This PR shows the section id and the offset within that section for the function address of each stack frame, which then can be used to calculate the function's RVA and also locate the debug symbol in PBD with the help of WinDBG.
The format of the output will be:
<function virtual address> <section number>:<section offset> <module path>
, and the function's RVA will be the section's virtual address (which we will find out with the help of WinDBG) + section offset.Given the following line from the crash log:
Once we load the
OrcaSlicer.dll
file in WinDBG with the correct PDB file, we can follow these steps to get the debug symbol:lm
, which gives you the name of the module:in which
OrcaSlicer
is the module name, which will be used in the following steps.2.
!dh OrcaSlicer
, which list the sections of this module. What we need to find is the section0x1
, as indicated in the crash log:what important to us is the value of
virtual address
, which is0x1000
in our case3.
ln OrcaSlicer + 1000 + 0x8DC5DC
, which reveals the final symbol:Note: the CI process will need to be updated to upload the PBD file as well.