-
Notifications
You must be signed in to change notification settings - Fork 249
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
Switch to gimli-symbolize
by default
#324
Conversation
I think it's very much worth calling out @philipc for the help they did here too. The primary reason I felt like now is the time to do this is that the dependency tree of
|
682df6a
to
ca6cdb6
Compare
This commit switches this crate to using `gimli` by default for parsing DWARF debug information. This is a long time coming and brings a number of benefits: * Primarily, Rust is safe. The libbacktrace library has been plagued with segfaults ever since we first started using it. Gimli, however, is almost entirely safe code. This should make us much more resilient in the face of buggy debuginfo. * Secondarily, it means this library no longer needs a C compiler. Being an all-Rust crate generally makes it much easier to cross-compile, port, etc. * Finally, this paves the road for future improvements such as split-debuginfo support by default. The libbacktrace library hasn't really changed since we started using it years ago, and this gives us more control over what's used and how now. Closes #189
ca6cdb6
to
31a3228
Compare
Is this at all related to the use of dsymutil on Mac? |
@nnethercote I don't believe so, no, dsymutil isn't related to switching to gimli. Are you seeing some issues though? |
Part of the split debuginfo support should be to allow us to avoid running dsymutil. |
Recently, I briefly looked into what would be required to stop running dsymutil for rustc on Mac. It's complicated and I don't remember all the details, but backtraces on panics is a big part of the story -- dsymutil is currently needed for them to produce useful file names and line numbers. |
@nnethercote ah yeah it is correct that avoiding dsymutil breaks backtraces. The fix for that isn't implemented yet and we just basically assumed it would not ever get fixed for libbacktrace, so we assumed it would get implemented for gimli instead. The implementation still needs to happen and additionally this needs to be integrated into libstd, both of which are large ish chunks of work |
what are the issues I should be watching for progress on non-dsymutil backtraces? Thanks! |
#287 is probably the best choice for that |
This commit switches this crate to using
gimli
by default for parsingDWARF debug information. This is a long time coming and brings a number
of benefits:
Primarily, Rust is safe. The libbacktrace library has been plagued
with segfaults ever since we first started using it. Gimli, however,
is almost entirely safe code. This should make us much more resilient
in the face of buggy debuginfo.
Secondarily, it means this library no longer needs a C compiler. Being
an all-Rust crate generally makes it much easier to cross-compile,
port, etc.
Finally, this paves the road for future improvements such as
split-debuginfo support by default. The libbacktrace library hasn't
really changed since we started using it years ago, and this gives us
more control over what's used and how now.
Closes #189