mirror of
https://github.com/facebookexperimental/reverie.git
synced 2024-11-28 01:06:45 +00:00
Update gimli from 0.26.1 to 0.28.1
Summary: This release includes https://github.com/gimli-rs/addr2line/pull/260 which unblocks supporting Split DWARF in reverie and cadaverdog. Separately, ayermolo is looking into whether this gimli update fixes an issue with an iOS test that uses lionhead, and uses gimli to dump debuginfo, which is blocking the land of DWARF5. Reviewed By: jasonwhite Differential Revision: D51814926 fbshipit-source-id: ae0882432019250060c65792476a0f6e296daffb
This commit is contained in:
parent
ccaa2e5f1d
commit
b5d1131efc
3 changed files with 25 additions and 6 deletions
|
@ -8,12 +8,11 @@ edition = "2021"
|
|||
license = "BSD-2-Clause"
|
||||
|
||||
[dependencies]
|
||||
addr2line = "0.18"
|
||||
addr2line = "0.21"
|
||||
anyhow = "1.0.75"
|
||||
async-trait = "0.1.71"
|
||||
bitflags = "1.3"
|
||||
byteorder = "1.3"
|
||||
gimli = "0.26"
|
||||
lazy_static = "1.4"
|
||||
libc = "0.2.139"
|
||||
linked-hash-map = { version = "0.5", features = ["serde_impl"] }
|
||||
|
|
|
@ -16,6 +16,8 @@ use std::io;
|
|||
use std::io::Read;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use addr2line::LookupContinuation;
|
||||
use addr2line::LookupResult;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
|
@ -155,7 +157,20 @@ impl Backtrace {
|
|||
let symbols = cache.load(library)?;
|
||||
|
||||
// Find the file + line number of the instruction pointer.
|
||||
if let Ok(mut source_frames) = symbols.find_frames(addr) {
|
||||
let mut lookup_result = symbols.find_frames(addr);
|
||||
if let Ok(mut source_frames) = loop {
|
||||
match lookup_result {
|
||||
LookupResult::Output(result) => break result,
|
||||
LookupResult::Load {
|
||||
load: _,
|
||||
continuation,
|
||||
} => {
|
||||
// FIXME support Split DWARF
|
||||
// let dwo = do_split_dwarf_load(load);
|
||||
lookup_result = continuation.resume(None);
|
||||
}
|
||||
}
|
||||
} {
|
||||
while let Ok(Some(f)) = source_frames.next() {
|
||||
if let Some(loc) = f.location {
|
||||
locations.push(Location {
|
||||
|
|
|
@ -14,8 +14,9 @@ use std::os::unix::ffi::OsStrExt;
|
|||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use gimli::EndianSlice;
|
||||
use gimli::RunTimeEndian as Endian;
|
||||
use addr2line::gimli;
|
||||
use addr2line::gimli::EndianSlice;
|
||||
use addr2line::gimli::RunTimeEndian as Endian;
|
||||
use memmap2::Mmap;
|
||||
use object::Object as _;
|
||||
use object::ObjectSegment;
|
||||
|
@ -173,7 +174,11 @@ impl Symbols {
|
|||
pub fn find_frames(
|
||||
&self,
|
||||
probe: u64,
|
||||
) -> Result<addr2line::FrameIter<EndianSlice<'static, Endian>>, gimli::read::Error> {
|
||||
) -> addr2line::LookupResult<
|
||||
impl addr2line::LookupContinuation<
|
||||
Output = Result<addr2line::FrameIter<EndianSlice<'static, Endian>>, gimli::read::Error>,
|
||||
>,
|
||||
> {
|
||||
self.context.dwarf.find_frames(probe + self.base_addr())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue