rust-lang / backtrace-rs

Backtraces in Rust
https://docs.rs/backtrace
Other
527 stars 245 forks source link

Optional fall back to LLVM symbolizer markup #485

Open mysterymath opened 1 year ago

mysterymath commented 1 year ago

Now that Symbolizer Markup has landed in LLVM 15.0.2, it would be possible to add an option to emit this markup whenever symbol information is unavailable (fully-stripped binaries, etc.).

Producing symbolizer markup would allow llvm-symbolizer to produce human-readable backtraces from it after the fact, looking up the necessary artifacts using debuginfod. This complements https://github.com/rust-lang/backtrace-rs/issues/459; since it would be nice to have debuginfod lookups handled transparently, but that's not always possible (e.g., for embedded or sandboxed environments).

This should be relatively straightforward to implement, since the format is just a simple textual representation of the memory layout of the process and the return addresses of the backtrace.

workingjubilee commented 1 year ago

It's not clear to me from a quick scan of those docs whether this needs to be implemented in this crate, but given a PR that adds some appropriately factored API I am not sure why we would not.