pdb
A Rust library for parsing Microsoft PDB (Program Database) debugging information files.
Repository Health
Technical Analysis
pdb is a Rust library that parses Microsoft PDB (Program Database) files, the debugging information produced by most compilers that target Windows. It exposes the symbols, types, modules, line information, and other debugging data stored inside a PDB without requiring Windows, the DIA SDK, or any particular host byte ordering.
Inspired by the design of the gimli DWARF crate, pdb works with the on-disk data as long as possible and parses only what you ask for, using a fallible-iterator API for streaming access. It does not cover every legacy corner of the historically complex PDB format, but it handles enough to be genuinely useful for debugging and analyzing programs compiled today.
What You Get
- A parser for Microsoft PDB files covering symbols, types, modules, and line information
- A cross-platform, dependency-light API with no reliance on Windows or the DIA SDK
- Lazy, fallible-iterator based access that parses only the streams you request
- Type-information decoding for resolving names, sizes, and structure layouts
- Address mapping utilities to translate between RVAs and section offsets
Common Use Cases
- Symbolicating stack traces and crash dumps from Windows binaries
- Building cross-platform debuggers, profilers, and reverse-engineering tools
- Extracting type and symbol metadata for binary analysis pipelines
Under The Hood
Architecture - pdb models the MSF container and its numbered streams, then layers typed readers over them (symbol table, type information, module info, DBI, address map); everything is exposed through a PDB entry point and a FallibleIterator pattern so parsing stays lazy and errors are explicit.
Tech Stack - It is pure Rust with minimal dependencies and no platform requirements, deliberately avoiding the Windows DIA SDK so PDBs can be read on any target regardless of native byte ordering.
Code Quality - The crate is mature with a tests/ suite and real fixtures/ PDB files, though maintenance cadence has slowed in recent years; the last release (0.8.0) remains widely used, with millions of downloads.
API Design - The public API mirrors gimli’s zero-copy, parse-on-demand philosophy, offering ergonomic iterators over symbols and types plus docs.rs documentation and runnable examples that make first use straightforward.