[][src]Struct mozpdb::SymbolTable

pub struct SymbolTable<'t> { /* fields omitted */ }

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 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!
    		println!("{:x}:{:08x} is {}", data.segment, data.offset, symbol.name()?);
    	}
    	_ => {}
    }
}

Methods

impl<'t> SymbolTable<'t>[src]

pub fn iter(&self) -> SymbolIter[src]

Returns an iterator that can traverse the symbol table in sequential order.

Trait Implementations

impl<'t> Debug for SymbolTable<'t>[src]

Auto Trait Implementations

impl<'t> !Send for SymbolTable<'t>

impl<'t> !Sync for SymbolTable<'t>

impl<'t> Unpin for SymbolTable<'t>

impl<'t> !UnwindSafe for SymbolTable<'t>

impl<'t> !RefUnwindSafe for SymbolTable<'t>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]