Improved debug_lines
parsing based on the stmt_list
attribute of a compilation unit.
#71
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.
Description
DWARF includes a
debug_lines
segment that includes file and line number information about each die present. Previously we assumed there was only one entry in that segment that corresponded to the one compilation unit the DWARF data being parsed represents. Well it turns out a single DWARF description can represent multiple compilation units, and each unit may have its own subsection ofdebug_lines
.If a compilation unit does use
debug_lines
, it will specify which subsection to reference based on thestmt_list
attribute in its debug information entry (die). This PR looks for that specific attribute, and reads thedebug_lines
subsection that corresponds to the compilation unit in question to glean file declaration information.Related Issue
Issue #67 - better
debug_lines
support.Motivation and Context
This prevents a crash when die processing was using the wrong
debug_lines
table for file declaration derivation.How Has This Been Tested?
I have a sample object file that was previously crashing, but is not anymore. Unfortunately it cannot be made public.
Screenshots (if appropriate):
Types of changes
Checklist: