Add note on Clang -gdwarf-aranges option to README #249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.