Struct pdb::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 = pdb::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
sourceimpl<'s> DebugInformation<'s>
impl<'s> DebugInformation<'s>
sourcepub fn machine_type(&self) -> Result<MachineType>
pub fn machine_type(&self) -> Result<MachineType>
Returns the target’s machine type (architecture).
sourcepub fn age(&self) -> Option<u32>
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.
sourcepub fn modules(&self) -> Result<ModuleIter<'_>>
pub fn modules(&self) -> Result<ModuleIter<'_>>
Returns an iterator that can traverse the modules list in sequential order.
sourcepub fn section_contributions(&self) -> Result<DBISectionContributionIter<'_>>
pub fn section_contributions(&self) -> Result<DBISectionContributionIter<'_>>
Returns an iterator that can traverse the section contributions list in sequential order.
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more