-
Notifications
You must be signed in to change notification settings - Fork 108
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
Impl range write #362
Impl range write #362
Conversation
It is failing for https://github.com/gimli-rs/gimli/pull/362/files#diff-b0573ccce68b7d366aa6a11719034ce8R1815.
|
I found the problem. |
I have tested |
Changing version to 5 and running dwarfdump on target/out/mini_core.dummy_name.rcgu.o looks ok. Note that gimli's dwarfdump should be able to read everything we write. |
This is ready for review. |
When enabling dwarf version 5 in cg_clif, I get
|
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.
Thanks for doing this! Most of the comments are minor.
/// A table of ranges that will be stored in a `.debug_ranges` or `.debug_rnglists` section. | ||
#[derive(Debug, Default)] | ||
pub struct RangesTable { | ||
ranges: IndexSet<RangeList>, |
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.
ranges: IndexSet<RangeList>, | |
// TODO: determine if duplicate range lists occur in practice. This may be better as a plain `Vec`. | |
ranges: IndexSet<RangeList>, |
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.
You mean to improve performance?
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.
Yes. Probably won't make much difference to performance in the whole either. Mostly I just want to document that use of IndexSet
probably isn't strictly required.
This won't support conversion of relocatable range lists. For that we'll need to switch to converting the raw ranges, but I'm happy to leave that until another PR. Normally I would also want more tests in |
This is looking good. Can you please:
|
2410e41
to
1553a19
Compare
Done |
Thanks! |
Fixes #360
I have only implemented DWARF 4.debug_ranges
writing, not DWARF 5.debug_rnglists
yet.Edit: implemented
.debug_rnglists
, but didn't test it. (I have no DWARF 5 supporting dwarfdump)