[−][src]Struct pdb::SymbolTable
PDB symbol tables contain names, locations, and metadata about functions, global/static data, constants, data types, and more.
The SymbolTable
holds a SourceView
referencing the symbol table inside the PDB file. All the
data structures returned by a SymbolTable
refer to that buffer.
Example
let file = std::fs::File::open("fixtures/self/foo.pdb")?; let mut pdb = pdb::PDB::open(file)?; let symbol_table = pdb.global_symbols()?; let address_map = pdb.address_map()?; let mut symbols = symbol_table.iter(); while let Some(symbol) = symbols.next()? { match symbol.parse() { Ok(pdb::SymbolData::PublicSymbol(data)) if data.function => { // we found the location of a function! let rva = data.offset.to_rva(&address_map).unwrap_or_default(); println!("{} is {}", rva, symbol.name()?); } _ => {} } }
Methods
impl<'s> SymbolTable<'s>
[src]
pub fn iter(&self) -> SymbolIter
[src]
Returns an iterator that can traverse the symbol table in sequential order.
Trait Implementations
Auto Trait Implementations
impl<'s> !Send for SymbolTable<'s>
impl<'s> !Sync for SymbolTable<'s>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,