References
December 12, 2025 · View on GitHub
This document brings together many of the existing resources that describe PDB and describes the file format at a level of detail sufficient for implementing some tools.
The primary sources for this document:
-
Microsoft published a GitHub repository: https://github.com/microsoft/microsoft-pdb. This contains a snapshot of some of the PDB sources, including header files that describe data structures and a pdbdump tool. Microsoft has not updated this repo in years, and recently marked it as "archived." It does not accept pull requests.
The following paths with the
microsoft-pdbrepo contain useful information:-
langapi/include/cvinfo.h– Many essential definitions for CodeView debug info, including theLF_*andS_*constants and structures which define the fixed-size portion of many type and symbol records. -
langapi/include/cvexefmt.h– CodeView definitions for executables. -
langapi/include/pdb.h– The API for the PDB reader/writer library. This is an implementation detail and does not contain descriptions of the file structures. However, it is useful for seeing the operations defined by the implementation. -
PDB/src/tools/cvdump/dumppdb.cpp– Dumps information in PDBs. -
PDB/dbi/pdb.cpp– The PDB reader/writer library. -
PDB/dbi/dbi.cppanddbi.h– Code which can read the Debug Information (DBI) Stream. -
PDB/dbi/gsi.cppandgsi.h– Code which can read the Global Symbol Index (GSI) Stream. -
PDB/dbi/mod.cppandmod.h– Code which can read Module Information Streams (akamodormodistreams).
As a resource, this repository is useful but incomplete. It does not describe all of the information in PDBs and it does not describe invariants or relationships. Still, it has been a valuable resource for the external developers who created the LLVM web site, and various other tools for reading PDBs.
-
-
The LLVM Project provides The PDB File Format. This web site covers some of the basics of PDB, enough to write a simple PDB reader for a subset of the information in PDBs. It is not comprehensive. Some of the information in this web site is incorrect.
-
The https://github.com/willglynn/pdb repository. This is an open source library (MIT and Apache dual-licensed), implemented in Rust, which can read some information from PDBs.
-
The https://github.com/MolecularMatters/raw_pdb repository. This is an open source library (BSD 2-clause), implemented in C++, which can read some information from PDBs.
-
The microsoft-pdb repository. Contains documentation and implementation for PDB and CodeView. In many ways, this is the most authoritative public implementation resource for PDB, but it is not a document and not a reference. The repository was provided as a resource by Microsoft, primarily as an aid for the LLVM Project. The source code in it is not complete (not buildable) and the repository has been archived.
In the
microsoft-pdbrepository, thecvinfo.hheader contains many CodeView definitions but does not document their semantics. -
[CODEVIEW] The CodeView specification for type records and symbol records. This information has been published by Microsoft previously, but is not currently offered.
-
CodeView, the MS debug info format, in LLVM
(Reid Kleckner) Describes the progress and status of the LLVM Project's effort to support CodeView and PDB.
-
Microsoft published
MS_Symbol_Type_v1.0.pdfin 2004, which contains extensive documentation on the CodeView type and symbol records. It has been archived repeatedly on the Internet.