-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in relookup source code path (#23)
When re-looking up frames to include source info, we now correctly use the starting address of the function, and offset into the function, and then compare to see which line covers that computed address, and then use the RVA for that line of code to "re-write" the frame in the module+RVA notation. The earlier implementation used the RVA of the function to add the offset to, which is incorrect in cases where there was re-ordering of chunks of machine code done by the compiler in the process of optimization. Address offset for each function is stable in these cases as well, and thereby using the mapping offered by the PDB to get back the actual (sometimes re-located) RVA based on this logic, is correct behavior. This change also streamlines the "re-lookup" code path to just re-write the frame as module+RVA, and thereby allowing other downstream processing (such as looking up inlinees, etc.) to reuse existing code.
- Loading branch information
1 parent
ec2ea6f
commit a4747e3
Showing
3 changed files
with
27 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters