Skip to content
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

Fix various issues with debug_lines parsing, and support DWARF5 #383

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

peadar
Copy link

@peadar peadar commented Aug 17, 2024

This fixes '-d inlines' support for ELF, and also allows it work with DWARF5 - fixes #311

Copy link

google-cla bot commented Aug 17, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@peadar
Copy link
Author

peadar commented Aug 29, 2024

CLA issues should be sorted - any opinions on this?

Do this for all CUs, not just the first one. A previous incarnation of
the DWARF parser didn't seem to separate out the translation units, and
would implicitly iterate all. The change to making compilation units
more visibile seems to have broken this.
This attribute is a LEB128 encoded value - decode it as such. Later use
of attributes of this form may need some work, but without parsing it
correctly, we break parsing of further attributes completely.
There are some differences between the DWARF4 and DWARF5 .debug_lines
table format. Implement the DWARF5 changes.

Mostly, the changes are to make the parser aware of the more
sophisticated format of the directory and file tables, with some minor
conditional changes in the header itself.
@haberman
Copy link
Member

Thanks for the fixes. If possible, it would be really helpful to add yaml2obj tests. We don't currently have any for debug_lines, but it would be great to add some: https://github.com/google/bloaty/tree/main/tests/dwarf

@peadar
Copy link
Author

peadar commented Aug 29, 2024

Sure, let me take a look

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.

"-d inlines" no longer works on Android shared library
2 participants