[−][src]Crate pdb
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 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()?); } _ => {} } }
Re-exports
pub use fallible_iterator::FallibleIterator; |
Structs
AddressMap | A mapping between addresses and offsets used in the PDB and PE file. |
AnnotationReferenceSymbol | The information parsed from a symbol record with kind |
ArgumentList | The information parsed from a type record with kind |
ArrayType | The information parsed from a type record with kind
|
BaseClassType | The information parsed from a type record with kind |
BitfieldType | The information parsed from a type record with kind |
ClassType | The information parsed from a type record with kind
|
Compile3Symbol | The information parsed from a symbol record with kind
|
ConstantSymbol | The information parsed from a symbol record with kind |
DataReferenceSymbol | The information parsed from a symbol record with kind |
DataSymbol | The information parsed from a symbol record with kind
|
DebugInformation | Provides access to the "DBI" stream inside the PDB. |
EnumerateType | The information parsed from a type record with kind |
EnumerationType | The information parsed from a type record with kind |
FieldAttributes | |
FieldList | The information parsed from a type record with kind |
FunctionAttributes | |
ImageSectionHeader | A PE |
MemberFunctionType | The information parsed from a type record with kind |
MemberType | The information parsed from a type record with kind |
MethodList | The information parsed from a type record with kind |
MethodListEntry | An entry in a |
MethodType | The information parsed from a type record with kind |
ModifierType | The information parsed from a type record with kind |
Module | Represents a module from the DBI stream. |
ModuleInfo | This struct contains data about a single module from its module info stream. |
ModuleIter | A |
NamespaceSymbol | The information parsed from a symbol record with kind
|
NestedType | The information parsed from a type record with kind
|
ObjNameSymbol | The information parsed from a symbol record with kind
|
OverloadedMethodType | The information parsed from a type record with kind |
PDB |
|
PDBInformation | A PDB info stream header parsed from a stream. |
PdbInternalRva | A Relative Virtual Address in an unoptimized PE file. |
PdbInternalSectionOffset | An offset relative to a PE section in the original unoptimized binary. |
PointerAttributes | |
PointerType | The information parsed from a type record with kind |
PrimitiveType | Represents a primitive type like |
ProcedureFlags | The information parsed from a CV_PROCFLAGS bit field |
ProcedureReferenceSymbol | The information parsed from a symbol record with kind
|
ProcedureSymbol | The information parsed from a symbol record with kind
|
ProcedureType | The information parsed from a type record with kind |
PublicSymbol | The information parsed from a symbol record with kind |
RawString |
|
Rva | A Relative Virtual Address as it appears in a PE file. |
SectionOffset | An offset relative to a PE section. |
SourceSlice | Represents an offset + size of the source file. |
StaticMemberType | The information parsed from a type record with kind |
StreamName | A named stream contained within the PDB file. |
StreamNames | A list of named streams contained within the PDB file. |
Symbol | Represents a symbol from the symbol table. |
SymbolIter | A |
SymbolTable | PDB symbol tables contain names, locations, and metadata about functions, global/static data, constants, data types, and more. |
ThreadStorageSymbol | The information parsed from a symbol record with kind
|
Type | Represents a type from the type table. A |
TypeFinder | A |
TypeInformation |
|
TypeIter | A |
TypeProperties | |
UnionType | The information parsed from a type record with kind |
UserDefinedTypeSymbol | The information parsed from a symbol record with kind |
VirtualBaseClassType | The information parsed from a type record with kind |
VirtualFunctionTablePointerType | The information parsed from a type record with kind |
Enums
ClassKind | Used by |
Error | An error that occurred while reading or parsing the PDB. |
Indirection | |
MachineType | The target machine's architecture. Reference: https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#machine-types |
PrimitiveKind | |
SymbolData |
|
TypeData | Encapsulates parsed data about a |
Variant |
Traits
Source | The |
SourceView | An owned, droppable, read-only view of the source file which can be referenced as a byte slice. |
Type Definitions
NameIter | |
Result | |
TypeIndex |
|