debug: support loading elf debug info from external files #15531
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.
Some distributions (ie. Ubuntu) have their libc debug info in separate files. This change allows the stack walking code to read that debug info.
Example:
Before:
After:
In this case it's loading the debug info from
/usr/lib/debug/.build-id/69/389d485a9793dbe873f0ea2c93e02efaa9aa3d.debug
.Now that the debug info is being loaded, I'm going to see how complex building a DWARF unwinder would be (so that stack frames aren't missed due to
-fomit-frame-pointer
). In the above example, theputs
call is missed because of this.The same stack in gdb: