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

DW_DLE_RNGLISTS_ERROR with dwarf 5 debug fission generated by gcc 10 #259

Closed
jeremy-rifkin opened this issue Aug 18, 2024 · 8 comments
Closed

Comments

@jeremy-rifkin
Copy link
Contributor

jeremy-rifkin commented Aug 18, 2024

Hi,
I'm seeing errors along the following lines from libdwarf and dwarfdump:

DW_DLE_RNGLISTS_ERROR: rnglists table index of 26 is unusable, there is no default  rnglists base address .

This was after compiling a test executable with gcc 10, dwarf 5, debug fission, and release mode. Interestingly I didn't encounter errors on a binary built in debug mode, I'm not sure if this is a fluke or a hint about what gcc is doing. I also didn't encounter this when building with newer versions of gcc.

I invoked dwarfdump with libdwarf-code/build/src/bin/dwarfdump/dwarfdump -i -M -G -vv --file-tied=demo test/CMakeFiles/demo.dir/demo.cpp.dwo.

Here are the relevant demo and demo.cpp.dwo files: demo_and_dwo.zip

@davea42
Copy link
Owner

davea42 commented Aug 19, 2024

I have the files and hope to take a look today.

@davea42
Copy link
Owner

davea42 commented Aug 19, 2024

Test setup works, reproduced the error.

@davea42
Copy link
Owner

davea42 commented Aug 20, 2024

I had to a little renaming (internals) to make this rnglists/loclists understandable in the code.
So, now I realize I did not write the code needed (for rnglists and loclists)
to get their data from the appropriate skeleton in the tied-file (using a signature).
We do it for .debug_addr, but not for rnglists/loclists.
So I have a bit of code to write ... not much, but some.

As is, the code only works if the rnglists/loclists are in the main object, not the tied-file.

@davea42
Copy link
Owner

davea42 commented Aug 29, 2024

Code fixed, running regression tests now.

@davea42
Copy link
Owner

davea42 commented Aug 29, 2024

I pused the fixes to github, closing the issue.

@davea42 davea42 closed this as completed Aug 29, 2024
jeremy-rifkin added a commit to jeremy-rifkin/cpptrace that referenced this issue Aug 30, 2024
jeremy-rifkin added a commit to jeremy-rifkin/cpptrace that referenced this issue Aug 30, 2024
@jeremy-rifkin
Copy link
Contributor Author

Thank you!
It looks like with the current main of libdwarf some other of my test cases are failing for me, e.g.

| compiler   | stdlib    | sanitizers | build_type     | shared | has_dl_find_object | split_dwarf | dwarf_version |
| g++-10     | libstdc++ | OFF        | RelWithDebInfo | OFF    | OFF                | ON          | 4             |

I'll look into this tomorrow to see if I'm doing something wrong of if the problem is on libdwarf's side.

@davea42
Copy link
Owner

davea42 commented Aug 30, 2024

I just fixed a problem with reading .debug_names, hope to push fix today.
See issue #261

@jeremy-rifkin
Copy link
Contributor Author

Looks like I'm still seeing errors in 1038e7c, not sure if that's the pushed fix for 261 you refer to or not. I can look into this more later.

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

No branches or pull requests

2 participants