forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 354
Add support for Dwarf 5 in MCCAS #7584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
fbdf8af to
af9e21e
Compare
Author
|
@swift-ci please test llvm |
rastogishubham
commented
Oct 6, 2023
rastogishubham
commented
Oct 6, 2023
af9e21e to
5c35f4f
Compare
Author
|
@swift-ci please test llvm |
5c35f4f to
0259cf5
Compare
Author
|
@swift-ci please test llvm |
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.
0259cf5 to
410a528
Compare
Author
|
@swift-ci please test |
adrian-prantl
approved these changes
Oct 10, 2023
felipepiovezan
approved these changes
Oct 10, 2023
felipepiovezan
left a comment
There was a problem hiding this 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.
410a528 to
487604b
Compare
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.
487604b to
1aa3ace
Compare
Author
|
@swift-ci please test llvm |
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.
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.