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 note on Clang -gdwarf-aranges option to README #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

csw
Copy link
Contributor

@csw csw commented Dec 16, 2021

I encountered a problem when using libdw with Clang 13 on Linux, where backward was not printing source location information for code compiled with Clang (it was visible for gcc-compiled libraries, however). I saw the comment on line 1845 about Clang not emitting a .debug_aranges section and having to use a fallback method to try to find source locations, and found that Clang has a -gdwarf-aranges option. Enabling this fixed the problem.

I'm almost positive I had this working in the past, so it's possible that an update to Clang, libdw, or backward broke something here. It worked using gcc, as well as Clang with libbfd.

I may be missing a better way to solve this, but it's probably worth documenting whatever the best answer is.

@csw csw marked this pull request as draft December 16, 2021 15:22
@csw
Copy link
Contributor Author

csw commented Dec 16, 2021

Marking this as a draft for now; some part of this combination appears to be buggy. (edit: apparently libdw just uses a lot of stack space)

@csw csw marked this pull request as ready for review December 16, 2021 20:02
@bombela
Copy link
Owner

bombela commented Dec 20, 2021

Yeah I am also certain it worked fine before. In fact I think I used clang for the screenshot in the readme, years ago.

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.

None yet

2 participants