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
Support DWARF5 standardization of GNU extension expression opcodes #410
Comments
PRs welcome |
Those are listed in the enum, not recognized by the expression parser and not dumped by the description generator. I could provide the latter, but where would we get a binary to test? That'd be more of a challenge. I do have a sample that produces the older GNU counterparts to them (not all those opcodes, just some), both built and the source. Let me try to build the same source with DWARF5, see where that takes me. |
Thanks ! I did not provide a PR since it's trivial to add, and the problem is actually having a test case for it as you noted. I guess worst case scenario would be to manually replace opcodes in the binary with the GNU_ versions and run through it ? |
Rebuilt the same code for Linux/x64 with DWARF5, got a test binary. All the listed opcodes are there. Stay tuned for a PR. |
I'd like to. Barring more surprises from GNU, this shouldn't take long. |
Update: looks like the new in DWARF5 section |
I have a rudimentary implementation outside of pyelftools for this, let me make a proper patch for it. |
I'm already halfway :) |
Great :-) Please ping me for the review if you want. |
Hi, I ran into issues trying to use the
On
and
You can use Edit: attached a zip of the files in question: dwarf5.zip |
@rdunklau: got any test binaries? Preferably one with the whole gamut of @vegard: we just had a PR with support for the V5 lineprogram logic, merged yesterday. Can you pull the latest master and test with that? Also, normally one creates a new issue, unless you are reasonably sure your error has the same nature as the one in this issue. From looking at the error message, it's not. |
@sevaa no test binary unfortunately. I started implementing the basics because one of the binaries I'm working with had it (compiled with gcc 12.1). |
|
|
It seems like we'll want to wait for these fixes before releasing 0.29 |
With two new sections to look at, this with break the DWARFInfo constructor. Consumers that use elftools as a DWARF parser for non-ELF files, myself included, will have to accommodate. No way around it. Won't be the first time, though. |
That's OK. pyelftools is fairly low-level infra and not aiming for a stable API. I wouldn't break things just for fun, but if there's a good reason to do so, that's not a big problem. |
I'm also adding -debug-dump=Ranges (sic) to the readelf tests. This should be fun. |
Sounds like lots of queued-up changes. Thanks for tackling this! |
Catch #418. I'll keep ranges until the next one. |
Thanks ! I'm closing this. |
Will the |
Make a new issue. |
In dwarfv5, a number of GNU extensions have been standardized.
I don't know how to test for them to be honest, but it would be nice to add synonyms to the GNU extension opcodes we already parse.
It seems to me that the following should be added:
DW_OP_GNU_entry_value => DW_OP_entry_value
DW_OP_GNU_const_type => DW_OP_const_type
DW_OP_GNU_regval_type => DW_OP_regval_type
DW_OP_GNU_deref_type => DW_OP_deref_type
DW_OP_GNU_implicit_pointer => DW_OP_implicit_pointer
DW_OP_GNU_convert => DW_OP_convert
The text was updated successfully, but these errors were encountered: