From aaddd2a1aee4360ae6932827a67563adb1f049f7 Mon Sep 17 00:00:00 2001 From: Philip Craig Date: Tue, 10 Jul 2018 18:17:22 +1000 Subject: [PATCH] Update addr2line to 0.7.0 --- Cargo.toml | 6 +++--- src/symbolize/gimli.rs | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f7f202164..921906ad4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,11 +23,11 @@ rustc-serialize = { version = "0.3", optional = true } # Optionally demangle C++ frames' symbols in backtraces. cpp_demangle = { default-features = false, version = "0.2.3", optional = true } -addr2line = { version = "0.6.0", optional = true } +addr2line = { version = "0.7.0", optional = true } findshlibs = { version = "0.4.0", optional = true } -gimli = { version = "0.15.0", optional = true } +gimli = { version = "0.16.0", optional = true } memmap = { version = "0.6.2", optional = true } -object = { version = "0.7.0", optional = true } +object = { version = "0.9.0", optional = true } [target.'cfg(unix)'.dependencies] libc = "0.2" diff --git a/src/symbolize/gimli.rs b/src/symbolize/gimli.rs index 2da584116..ed5d66917 100644 --- a/src/symbolize/gimli.rs +++ b/src/symbolize/gimli.rs @@ -15,12 +15,12 @@ use SymbolName; const MAPPINGS_CACHE_SIZE: usize = 4; -type Dwarf<'map> = addr2line::Context>; +type Dwarf = addr2line::Context>; type Symbols<'map> = object::SymbolMap<'map>; struct Mapping { + dwarf: Dwarf, // 'static lifetime is a lie to hack around lack of support for self-referential structs. - dwarf: Dwarf<'static>, symbols: Symbols<'static>, _map: Mmap, } @@ -35,7 +35,7 @@ impl Mapping { let dwarf = addr2line::Context::new(&object).ok()?; let symbols = object.symbol_map(); // Convert to 'static lifetimes. - unsafe { (mem::transmute(dwarf), mem::transmute(symbols)) } + (dwarf, unsafe { mem::transmute(symbols) }) }; Some(Mapping { dwarf, @@ -182,14 +182,14 @@ pub fn resolve(addr: *mut c_void, cb: &mut FnMut(&super::Symbol)) { pub struct Symbol { addr: usize, - file: Option, + file: Option, line: Option, name: Option, } impl Symbol { fn new(addr: usize, - file: Option, + file: Option, line: Option, name: Option) -> Symbol {