pub struct Mapping {
pub iid: Option<u64>,
pub build_id: Option<u64>,
pub exact_offset: Option<u64>,
pub start_offset: Option<u64>,
pub start: Option<u64>,
pub end: Option<u64>,
pub load_bias: Option<u64>,
pub path_string_ids: Vec<u64>,
}
Fields§
§iid: Option<u64>
Interning key.
build_id: Option<u64>
Interning key.
exact_offset: Option<u64>
This is not set on Android 10.
start_offset: Option<u64>
§start: Option<u64>
§end: Option<u64>
§load_bias: Option<u64>
Libunwindstack-specific concept, not to be confused with bionic linker’s notion of load_bias. Needed to correct relative pc addresses (as produced by libunwindstack) when doing offline resymbolisation.
For an executable ELF PT_LOAD segment, this is: p_vaddr - p_offset
Where p_offset means that the code is at that offset into the ELF file on disk. While p_vaddr is the offset at which the code gets mapped, relative to where the linker loads the ELF into the address space. For most ELFs, the two values are identical and therefore load_bias is zero.
path_string_ids: Vec<u64>
E.g. [“system”, “lib64”, “libc.so”] id of string.
Implementations§
Source§impl Mapping
impl Mapping
Sourcepub fn build_id(&self) -> u64
pub fn build_id(&self) -> u64
Returns the value of build_id
, or the default value if build_id
is unset.
Sourcepub fn start_offset(&self) -> u64
pub fn start_offset(&self) -> u64
Returns the value of start_offset
, or the default value if start_offset
is unset.
Sourcepub fn load_bias(&self) -> u64
pub fn load_bias(&self) -> u64
Returns the value of load_bias
, or the default value if load_bias
is unset.
Sourcepub fn exact_offset(&self) -> u64
pub fn exact_offset(&self) -> u64
Returns the value of exact_offset
, or the default value if exact_offset
is unset.
Trait Implementations§
Source§impl Message for Mapping
impl Message for Mapping
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.