Enum addr2line::LookupResult
source · pub enum LookupResult<L: LookupContinuation> {
Load {
load: SplitDwarfLoad<<L as LookupContinuation>::Buf>,
continuation: L,
},
Output(<L as LookupContinuation>::Output),
}
Expand description
Operations that consult debug information may require additional files
to be loaded if split DWARF is being used. This enum returns the result
of the operation in the Output
variant, or information about the split
DWARF that is required and a continuation to invoke once it is available
in the Load
variant.
This enum is intended to be used in a loop like so:
const ADDRESS: u64 = 0xdeadbeef;
let mut r = ctx.find_frames(ADDRESS);
let result = loop {
match r {
LookupResult::Output(result) => break result,
LookupResult::Load { load, continuation } => {
let dwo = do_split_dwarf_load(load);
r = continuation.resume(dwo);
}
}
};
Variants§
Load
The lookup requires split DWARF data to be loaded.
Fields
load: SplitDwarfLoad<<L as LookupContinuation>::Buf>
The information needed to find the split DWARF data.
continuation: L
The continuation to resume with the loaded split DWARF data.
Output(<L as LookupContinuation>::Output)
The lookup has completed and produced an output.
Implementations§
source§impl<L: LookupContinuation> LookupResult<L>
impl<L: LookupContinuation> LookupResult<L>
sourcepub fn skip_all_loads(self) -> L::Output
pub fn skip_all_loads(self) -> L::Output
Callers that do not handle split DWARF can call skip_all_loads
to fast-forward to the end result. This result is produced with
the data that is available and may be less accurate than the
the results that would be produced if the caller did properly
support split DWARF.