pub struct PdbObject<'data> { /* private fields */ }
Expand description
Program Database, the debug companion format on Windows.
This object is a sole debug companion to PeObject
.
Implementations§
source§impl<'data> PdbObject<'data>
impl<'data> PdbObject<'data>
sourcepub fn parse(data: &'data [u8]) -> Result<PdbObject<'data>, PdbError>
pub fn parse(data: &'data [u8]) -> Result<PdbObject<'data>, PdbError>
Tries to parse a PDB object from the given slice.
sourcepub fn file_format(&self) -> FileFormat
pub fn file_format(&self) -> FileFormat
The container file format, which is always FileFormat::Pdb
.
sourcepub fn code_id(&self) -> Option<CodeId>
pub fn code_id(&self) -> Option<CodeId>
The code identifier of this object, always None
.
PDB files do not contain sufficient information to compute the code identifier, since they are lacking the relevant parts of the PE header.
sourcepub fn debug_id(&self) -> DebugId
pub fn debug_id(&self) -> DebugId
The debug information identifier of this PDB.
The PDB stores a specific header that contains GUID and age bits. Additionally, Microsoft uses the file name of the PDB to avoid GUID collisions. In most contexts, however, it is sufficient to rely on the uniqueness of the GUID to identify a PDB.
The same information is also stored in a header in the corresponding PE file, which can be used to locate a PDB from a PE.
sourcepub fn arch(&self) -> Arch
pub fn arch(&self) -> Arch
The CPU architecture of this object, as specified in the debug information stream (DBI).
sourcepub fn kind(&self) -> ObjectKind
pub fn kind(&self) -> ObjectKind
The kind of this object, which is always Debug
.
sourcepub fn load_address(&self) -> u64
pub fn load_address(&self) -> u64
The address at which the image prefers to be loaded into memory.
The PDB only stores relative addresses, and more importantly, does not provide sufficient
information to compute the original PE’s load address. The according PE, however does
feature a load address (called image_base
). See PeObject::load_address
for more
information.
sourcepub fn has_symbols(&self) -> bool
pub fn has_symbols(&self) -> bool
Determines whether this object exposes a public symbol table.
sourcepub fn symbols(&self) -> PdbSymbolIterator<'data, '_> ⓘ
pub fn symbols(&self) -> PdbSymbolIterator<'data, '_> ⓘ
Returns an iterator over symbols in the public symbol table.
sourcepub fn symbol_map(&self) -> SymbolMap<'data>
pub fn symbol_map(&self) -> SymbolMap<'data>
Returns an ordered map of symbols in the symbol table.
sourcepub fn has_debug_info(&self) -> bool
pub fn has_debug_info(&self) -> bool
Determines whether this object contains debug information.
sourcepub fn has_sources(&self) -> bool
pub fn has_sources(&self) -> bool
Determines whether this object contains embedded source.
sourcepub fn is_malformed(&self) -> bool
pub fn is_malformed(&self) -> bool
Determines whether this object is malformed and was only partially parsed
sourcepub fn debug_session(&self) -> Result<PdbDebugSession<'data>, PdbError>
pub fn debug_session(&self) -> Result<PdbDebugSession<'data>, PdbError>
Constructs a debugging session.
sourcepub fn has_unwind_info(&self) -> bool
pub fn has_unwind_info(&self) -> bool
Determines whether this object contains stack unwinding information.