pub struct File<'input> { /* private fields */ }
Expand description
The parsed debuginfo for a single file.
Implementations§
Source§impl<'input> File<'input>
impl<'input> File<'input>
Sourcepub fn parse(path: String) -> Result<FileContext>
pub fn parse(path: String) -> Result<FileContext>
Parse the file with the given path.
Sourcepub fn parse_object(
object: &File<'input>,
debug_object: &File<'input>,
path: String,
arena: &'input Arena,
) -> Result<File<'input>>
pub fn parse_object( object: &File<'input>, debug_object: &File<'input>, path: String, arena: &'input Arena, ) -> Result<File<'input>>
todo
Sourcepub fn machine(&self) -> Architecture
pub fn machine(&self) -> Architecture
The machine type that the file contains debuginfo for.
Sourcepub fn segment_bytes(&self, range: Range) -> Option<&'input [u8]>
pub fn segment_bytes(&self, range: Range) -> Option<&'input [u8]>
Find the segment data for the given address range.
Sourcepub fn relocations(&self) -> &[Relocation<'input>]
pub fn relocations(&self) -> &[Relocation<'input>]
A list of relocations in the file.
Sourcepub fn ranges(&self, hash: &FileHash<'_>) -> RangeList
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
.
Sourcepub fn function_size(&self) -> u64
pub fn function_size(&self) -> u64
The total size of functions in all compilation units.
Sourcepub fn variable_size(&self, hash: &FileHash<'_>) -> u64
pub fn variable_size(&self, hash: &FileHash<'_>) -> u64
The total size of variables in all compilation units.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more