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

Add read::Dwarf #352

Merged
merged 7 commits into from
Jan 10, 2019
Merged

Add read::Dwarf #352

merged 7 commits into from
Jan 10, 2019

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Jan 9, 2019

The motivation is to reduce the long parameter lists containing section readers, which is only going to get worse as we implement the new DWARF 5 sections.

Currently I'm only including the sections used when parsing .debug_info, which is the section that contains the most references to other sections. There will only be one of these structs per file, so it's probably not a problem to add other sections too if needed.

@philipc philipc requested a review from fitzgen January 9, 2019 07:38
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 87.259% when pulling 8ea8483 on philipc:read-dwarf into d12459a on gimli-rs:master.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

This is really nice! Feels much higher level now!

@fitzgen fitzgen merged commit e8c2067 into gimli-rs:master Jan 10, 2019
@philipc philipc deleted the read-dwarf branch January 10, 2019 21:21
@bjorn3
Copy link
Contributor

bjorn3 commented Jan 11, 2019

Could there be a new release soon? The latest on crates.io doesn't have the writer support yet.

@philipc
Copy link
Collaborator Author

philipc commented Jan 11, 2019

My plan was to get DWARF 5 done for the .debug_line read/write, but I've gotten sidetracked doing other DWARF 5 stuff that will make it easier to do that, and I've also been a bit lacking in time recently. I also want to add something that makes it easier to write DWARF for a single compilation unit. There will be more breaking changes for this, so I wasn't going to do a release just yet, but yes hopefully soon.

@bjorn3
Copy link
Contributor

bjorn3 commented Jan 11, 2019

I have rebased your rustc_codegen_cranelift debuginfo branch and I am working on extending it a bit.

(gdb) info frame 
Stack level 0, frame at 0x7fffffffdd80:
 rip = 0x555555554a00 in mini_core_hello_world::start::h1e715bf6fab28115; saved rip = 0x555555555dca
 called by frame at 0x7fffffffdd88
 Arglist at 0x7fffffffdd70, args: main=..., _argc=<optimized out>, _argv=...
 Locals at 0x7fffffffdd70, Previous frame's sp is 0x7fffffffdd80
 Saved registers:
  rip at 0x7fffffffdd78

Notice the args. It is really annoying when gdb silently ignores stuff (eg DW_AT_name for functions and DW_TAG_variable definitions)

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.

4 participants