backtrace-rs
backtrace-rs copied to clipboard
Parse short backtraces out of debuginfo
This implements the runtime side of https://github.com/rust-lang/compiler-team/issues/818.
- Extract a helper out of
find_framesfor iterating over aLookupContinuation - Make the type signature for
search_object_mapconsistent across all platforms. Backtraces are inherently platform specific, but let's not make it any harder on ourselves than we have to. - Add a new
pub fn short_backtraces() -> enum { ThisFrameOnly, Start, End }API - Use the new
gimli::UnitRef::shared_attrsAPI to determine whether a given frame has a short backtrace. This, for now, requires a git dependency on gimli.
Note that this currently does not work on MacOS. I do not have a Mac to test this; someone lent me theirs and I tracked it down to cx.find_dwarf_and_unit returning None, but I have not had the time or resources to narrow it down further than that.