Repository navigation
fix(extract_offsets): handle DWARF forward declarations, nested members, and location encodings - #1426
Open
umpireboulianne-design wants to merge 1 commit into
Conversation
…rs, and location encodings (limitlessprojects#1325)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1325
Summary
DW_AT_declarationon DIEs, resetcur = NoneonAbbrev Number: 0null DIE headers, and continue scanning inmembers_of()past forward-declaration or empty stubDW_TAG_structure_typeentries so later compilation units with the completeruntime.g/runtime.mdefinitions are found.DW_TAG_membercollection insidemembers_of()to direct children ate["depth"] == base + 1so inner struct members at deeper nesting levels cannot overwrite outerruntime.g/runtime.mfield offsets.DW_OP_plus_uconstlocations, andreadelfOSError: Strip.debug_str/.debug_line_strindirect/indexed string prefixes inDW_AT_name, parse hexadecimalDW_AT_byte_sizeandDW_AT_data_member_locationvalues, extractDW_OP_plus_uconstoffsets without misparsingN byte blockprefixes, and fail closed with exit code1whenreadelfraisesOSError.Testing
tools/test_extract_offsets.pyfor forward-declaration/empty-stub skipping, nested struct member depth-collision protection, null DIE handling, indirect strings/hex sizes/DW_OP_plus_uconstlocations, andreadelfOSErrorhandling.