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

Always call backtrace_syminfo with libbacktrace #185

Merged
merged 1 commit into from
May 15, 2019
Merged

Conversation

alexcrichton
Copy link
Member

Turns out if we favor backtrace_pcinfo then if there's no debuginfo
in the binary (e.g. strip -g) then symbol information comes out! It
also looks to have more accurate symbol names in terms of loading it
from the symbol table rather than debuginfo where debuginfo tends to
typically be a bit more terse in naming.

Turns out if we favor backtrace_pcinfo then if there's no debuginfo
in the binary (e.g. `strip -g`) then symbol information comes out! It
also looks to have more accurate symbol names in terms of loading it
from the symbol table rather than debuginfo where debuginfo tends to
typically be a bit more terse in naming.
@alexcrichton alexcrichton merged commit 0fdcf49 into master May 15, 2019
@alexcrichton alexcrichton deleted the always-syminfo branch May 15, 2019 14:44
alexcrichton added a commit that referenced this pull request May 16, 2019
This commit fixes an accidental regression with #185 where libbacktrace
was updated to match the standard library by always returning the symbol
table symbol. Turns out though this library was one-upping the standard
library by consulting debuginfo (what it was previously doing) because
debuginfo can have more accurate symbol information for inline
functions, for example.

The fix here is to always prefer the debuginfo function name, if
present, and otherwise fall back to the symbol table symbol if
necessary.

Closes #186
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.

1 participant