Struct File

Source
pub struct File<'input> { /* private fields */ }
Expand description

The parsed debuginfo for a single file.

Implementations§

Source§

impl<'input> File<'input>

Source

pub fn parse(path: String) -> Result<FileContext>

Parse the file with the given path.

Source

pub fn parse_object( object: &File<'input>, debug_object: &File<'input>, path: String, arena: &'input Arena, ) -> Result<File<'input>>

todo

Source

pub fn path(&self) -> &str

The file path.

Source

pub fn machine(&self) -> Architecture

The machine type that the file contains debuginfo for.

Source

pub fn segment_bytes(&self, range: Range) -> Option<&'input [u8]>

Find the segment data for the given address range.

Source

pub fn segments(&self) -> &[Segment<'input>]

A list of segments in the file.

Source

pub fn sections(&self) -> &[Section<'input>]

A list of sections in the file.

Source

pub fn symbols(&self) -> &[Symbol<'input>]

A list of symbols in the file.

Source

pub fn relocations(&self) -> &[Relocation<'input>]

A list of relocations in the file.

Source

pub fn units(&self) -> &[Unit<'input>]

A list of compilation units in the file.

Source

pub fn ranges(&self, hash: &FileHash<'_>) -> RangeList

A list of address ranges covered by the compilation units.

This includes both Unit::ranges and Unit::unknown_ranges.

Source

pub fn function_size(&self) -> u64

The total size of functions in all compilation units.

Source

pub fn variable_size(&self, hash: &FileHash<'_>) -> u64

The total size of variables in all compilation units.

Source

pub fn cfi(&self, range: Range) -> Vec<Cfi>

Call frame information for the given address range.

Auto Trait Implementations§

§

impl<'input> Freeze for File<'input>

§

impl<'input> RefUnwindSafe for File<'input>

§

impl<'input> Send for File<'input>

§

impl<'input> Sync for File<'input>

§

impl<'input> Unpin for File<'input>

§

impl<'input> UnwindSafe for File<'input>

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, 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.