Auto merge of #44251 - kennytm:osx-backtrace, r=alexcrichton

Add libbacktrace support for Apple platforms (resubmitted)

Resubmitting #43422 rebased on the current master (cc @JohnColanduoni).

I have added an additional commit to fallback to `dladdr`-based `resolve_symbol` if `libbacktrace` returns `None`, otherwise the stack trace will be full of `<unknown>` when you forget to pass the `-g` flag (actually it seems — at least on macOS — the `dladdr` symbol is more accurate than the `libbacktrace` one).
This commit is contained in:
bors 2017-09-09 17:32:13 +00:00
commit ddd123ed9a
10 changed files with 1477 additions and 24 deletions

View file

@ -33,9 +33,7 @@ macro_rules! dump_and_die {
($($pos:expr),*) => ({
// FIXME(#18285): we cannot include the current position because
// the macro span takes over the last frame's file/line.
if cfg!(any(target_os = "macos",
target_os = "ios",
target_os = "android",
if cfg!(any(target_os = "android",
all(target_os = "linux", target_arch = "arm"),
target_os = "freebsd",
target_os = "dragonfly",