Crate pdb [] [src]

The pdb create parses Microsoft PDB (Program Database) files. PDB files contain debugging information produced by most compilers that target Windows, including information about symbols, types, modules, and so on.

Usage

PDB files are accessed via the pdb::PDB object.

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{
            function: true,
            segment,
            offset,
            ..
        }) => {
            // we found the location of a function!
            println!("{:x}:{:08x} is {}", segment, offset, symbol.name()?);
        }
        _ => {}
    }
}

Reexports

pub use fallible_iterator::FallibleIterator;

Structs

DebugInformation

Provides access to the "DBI" stream inside the PDB.

FieldAttributes
FunctionAttributes
MethodListEntry
PDB

PDB provides access to the data within a PDB file.

RawString

RawString refers to a &[u8] that physically resides somewhere inside a PDB data structure.

SourceSlice

Represents an offset + size of the source file.

Symbol

Represents a symbol from the symbol table.

SymbolIter

A SymbolIter iterates over a SymbolTable, producing Symbols.

SymbolTable

PDB symbol tables contain names, locations, and metadata about functions, global/static data, constants, data types, and more.

Type

Represents a type from the type table. A Type has been minimally processed and may not be correctly formed or even understood by this library.

TypeFinder

A TypeFinder is a secondary, in-memory data structure that permits efficiently finding types by TypeIndex. It starts out empty and must be populated by calling update(&TypeIter) while iterating.

TypeInformation

TypeInformation provides zero-copy access to a PDB type data stream.

TypeIter

A TypeIter iterates over a TypeInformation, producing Typess.

TypeProperties

Enums

ClassKind

Used by TypeData::Class to distinguish class-like concepts.

EnumValue
Error

An error that occurred while reading or parsing the PDB.

Indirection
PrimitiveType
SymbolData

SymbolData contains the information parsed from a symbol record.

TypeData

Encapsulates parsed data about a Type.

Traits

Source

The pdb crate accesses PDB files via the pdb::Source trait.

SourceView

An owned, droppable, read-only view of the source file which can be referenced as a byte slice.

Type Definitions

Result
TypeIndex

TypeIndex refers to a type somewhere in PDB.type_information().