Skip to content

Conversation

@rastogishubham
Copy link

MCCAS doesn't support DWARF 5 currently. Since we are switching to DWARF 5 on all platforms relatively soon, we need to have MCCAS support it as well.

@rastogishubham rastogishubham force-pushed the MCCASD5 branch 2 times, most recently from fbdf8af to af9e21e Compare October 6, 2023 00:05
@rastogishubham
Copy link
Author

@swift-ci please test llvm

@rastogishubham
Copy link
Author

@swift-ci please test llvm

@rastogishubham
Copy link
Author

@swift-ci please test llvm

@rastogishubham rastogishubham changed the title Add support for DWARF 5 in MCCAS Add support for Dwarf 5 in MCCAS Oct 6, 2023
To support reading and writing DW_FORM_implicit_const in MCCAS, there is
a need to be able to read a signed value of a DWARFFormValue and be able
to write a signed LEB128 value to a CASObject. This change adds those
two functions to their respective classes.
In Dwarf 5, for proper UnitDIE extraction, the debug_str_offsets section
needs to be passed to the DWARFObject. This patch adds support for that.
@rastogishubham
Copy link
Author

@swift-ci please test

Copy link

@felipepiovezan felipepiovezan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please see the one comment I left!

This includes, parsing the Dwarf 5 Compile Unit header correctly
and correctly creating and materializing from the CAS with the larger
DWARFv5 header.
In DWARF 5, we can have padding after the debug_str section, so a
PaddingRef must be added after the CAS blocks for individual strings.
In DWARF 5, there is a new form, DW_FORM_implicit_const, which encodes
the value of the attribute in the debug_abbrev section, as a signed
LEB128 number. This change adds support for being able to parse that
and write it into MCCAS, as well as read it from a CASObject.
@rastogishubham
Copy link
Author

@swift-ci please test llvm

@rastogishubham rastogishubham merged commit 49b46cc into swiftlang:next Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants