blaze_sym

Struct blaze_sym 

Source
#[repr(C)]
pub struct blaze_sym { pub name: *const c_char, pub module: *const c_char, pub addr: Addr, pub offset: usize, pub size: isize, pub code_info: blaze_symbolize_code_info, pub inlined_cnt: usize, pub inlined: *const blaze_symbolize_inlined_fn, pub reason: blaze_symbolize_reason, pub reserved: [u8; 15], }
Expand description

The result of symbolization of an address.

A blaze_sym is the information of a symbol found for an address.

Fields§

§name: *const c_char

The symbol name is where the given address should belong to.

If an address could not be symbolized, this member will be NULL. Check the reason member for additional information pertaining the failure.

§module: *const c_char

The path to or name of the module containing the symbol.

Typically this would be the path to a executable or shared object. Depending on the symbol source this member may not be present or it could also just be a file name without path. In case of an ELF file contained inside an APK, this will be an Android style path of the form <apk>!<elf-in-apk>. E.g., /root/test.apk!/lib/libc.so.

§addr: Addr

The address at which the symbol is located (i.e., its “start”).

This is the “normalized” address of the symbol, as present in the file (and reported by tools such as readelf(1), llvm-gsymutil, or similar).

§offset: usize

The byte offset of the address that got symbolized from the start of the symbol (i.e., from addr).

E.g., when symbolizing address 0x1337 of a function that starts at 0x1330, the offset will be set to 0x07 (and addr will be 0x1330). This member is especially useful in contexts when input addresses are not already normalized, such as when symbolizing an address in a process context (which may have been relocated and/or have layout randomizations applied).

§size: isize

The size of the symbol.

If the symbol’s size is not available, this member will be -1. Note that some symbol sources may not distinguish between “unknown” size and 0. In that case the size will be reported as 0 here as well.

§code_info: blaze_symbolize_code_info

Source code location information for the symbol.

§inlined_cnt: usize

The number of symbolized inlined function calls present.

§inlined: *const blaze_symbolize_inlined_fn

An array of inlined_cnt symbolized inlined function calls.

§reason: blaze_symbolize_reason

On error (i.e., if name is NULL), a reason trying to explain why symbolization failed.

§reserved: [u8; 15]

Unused member available for future expansion.

Trait Implementations§

Source§

impl Debug for blaze_sym

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more