pyelftools
pyelftools copied to clipboard
Add support for DWARF version 5
pyelftools still doesn't support DWARF version 5 as seen here. Is there anything considerable to be done except changing those lines and adding the new DW_TAG and DW_AT? If no work as been done, I might give it a try as I need some DWARF version 5 information.
Locations section parsing would need to be rewritten.
There's actually a significant amount of change in DWARF v5. New line table header format, which can move pathnames to a new section. Location lists and range lists have a radically different encoding and use new section names. References to .debug_str from .debug_info can be indirect through a .debug_str_offsets section. Addresses can be in a separate .debug_addr section and referenced by index. If you want to get super fancy there are several new unit types which can refer to debug info in a separate ".dwo" (dwarf object) file.
Those are the big items, off the top of my head. There's a bunch of new FORMs to support the indirect references, and of course new DW_TAG and DW_AT items.
I know the DWARF side of things pretty well but I'm not such a great Python coder, and it's not clear my employer would give me time to work on this. But I thought it was worth spelling out the scope a little more fully.
I'm taking an initial stab at this, starting with the changes to CU headers.
Since this has been merged, a new release would be awesome!
One thing to keep in mind: the support I added is very preliminary. I’m positive additional work will be needed to fully support DWARF5!
Sent from mobile. Please excuse my brevity.
On Aug 14, 2021, at 3:37 AM, Philippe Ombredanne @.***> wrote:
Since this has been merged, a new release would be awesome!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
One thing to keep in mind: the support I added is very preliminary. I’m positive additional work will be needed to fully support DWARF5!
That's OK IMHO... at least we can start playing with these.
For the paranoid among us, one could make DWARF 5 support explicitly opt-in. Like, a flag that is False by default.
That said, I, as a consumer of pyelftools, would rather take my chances with the experimental code as it is.
Hi, I would like to support @sevaa 's request for a release with experimental code. As a user of this, it is better to have a solution that sometimes works (experimental DWARF 5 support), than one that never works (no DWARF 5 support)
Version 0.28 was released with all the latest stuff inside
How come this is still open? :)