Skip to content

Commit

Permalink
Update addr2line to 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed Jul 10, 2018
1 parent 3680399 commit aaddd2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions src/symbolize/gimli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ use SymbolName;

const MAPPINGS_CACHE_SIZE: usize = 4;

type Dwarf<'map> = addr2line::Context<gimli::EndianBuf<'map, gimli::RunTimeEndian>>;
type Dwarf = addr2line::Context<gimli::EndianRcSlice<gimli::RunTimeEndian>>;
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,
}
Expand All @@ -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,
Expand Down Expand Up @@ -182,14 +182,14 @@ pub fn resolve(addr: *mut c_void, cb: &mut FnMut(&super::Symbol)) {

pub struct Symbol {
addr: usize,
file: Option<PathBuf>,
file: Option<String>,
line: Option<u64>,
name: Option<String>,
}

impl Symbol {
fn new(addr: usize,
file: Option<PathBuf>,
file: Option<String>,
line: Option<u64>,
name: Option<String>)
-> Symbol {
Expand Down

0 comments on commit aaddd2a

Please sign in to comment.