Struct pdb2::DebugInformation

source ·
pub struct DebugInformation<'s> { /* private fields */ }
Expand description

Provides access to the “DBI” stream inside the PDB.

This is only minimally implemented; it’s really just so PDB can find the global symbol table.

Example

let file = std::fs::File::open("fixtures/self/foo.pdb")?;
let mut pdb = pdb2::PDB::open(file)?;

let dbi = pdb.debug_information()?;

let mut modules = dbi.modules()?;
while let Some(module) = modules.next()? {
    println!("module name: {}, object file name: {}",
             module.module_name(), module.object_file_name());
}

Implementations§

source§

impl<'s> DebugInformation<'s>

source

pub fn machine_type(&self) -> Result<MachineType>

Returns the target’s machine type (architecture).

source

pub fn age(&self) -> Option<u32>

Returns this PDB’s original age.

This number is written by the linker and should be equal to the image’s age value. In contrast, PDBInformation::age may be bumped by other tools and should be greater or equal to the image’s age value.

Old PDB files may not specify an age, in which case only PDBInformation::age should be checked for matching the image.

source

pub fn modules(&self) -> Result<ModuleIter<'_>>

Returns an iterator that can traverse the modules list in sequential order.

source

pub fn section_contributions(&self) -> Result<DBISectionContributionIter<'_>>

Returns an iterator that can traverse the section contributions list in sequential order.

Trait Implementations§

source§

impl<'s> Debug for DebugInformation<'s>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'s> !RefUnwindSafe for DebugInformation<'s>

§

impl<'s> Send for DebugInformation<'s>

§

impl<'s> Sync for DebugInformation<'s>

§

impl<'s> Unpin for DebugInformation<'s>

§

impl<'s> !UnwindSafe for DebugInformation<'s>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.