---
title: Program database
slug: program-database
qid: 
snapshot: enwiki-001375395460
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1375395460
tags: [109381940, 23118434, 23535758, 23603337, 24623845, 24745114, 24745122, 89061603]
---

# Program database

> [!note] Provenance
> Snapshot `enwiki-001375395460` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1375395460> · Licensed CC BY-SA 4.0

Program database (PDB) is a file format (developed by Microsoft) for storing debugging information about a program (or, commonly, program modules such as a DLL or EXE). PDB files commonly have a .pdb extension. A PDB file is typically created from source files during compilation. It stores a list of all symbols in a module with their addresses and possibly the name of the file and the line on which the symbol was declared. This symbol information is not stored in the module itself, because it takes up a lot of space.

Program database (PDB) is a file format (developed by Microsoft) for storing debugging information about a program (or, commonly, program modules such as a DLL or EXE). PDB files commonly have a .pdb extension. A PDB file is typically created from source files during compilation. It stores a list of all symbols in a module with their addresses and possibly the name of the file and the line on which the symbol was declared. This symbol information is not stored in the module itself, because it takes up a lot of space. Type records, variable length, count = (maximum - minimum) from above header. stream&nbsp;3 is a directory for other streams. Note, it is not present in Version 2, nor in a PDB produced by a compiler. The stream starts with a header which is padded to be 64 bytes in total Module information, variable length. Total size in above header. There is one of these for each object module used by the linker Opened, 4 bytes. Symbol info. Section number, 2 bytes + 2 bytes padding. Offset and size, 4 bytes each. Flags, 4 bytes. Module number, 2 bytes + 2 bytes padding. CRCs for section data and relocations data, 4 bytes each. Flags, 2 bytes. Stream number, 2 bytes. Symbols size, 4 bytes. Old and new line number info sizes, 4 bytes each. Number of source files, 2 bytes + 2 bytes padding. Offsets, 4 bytes. niSource and niCompiler, 4 bytes each. Module name, null terminated byte string. Object name, null terminated byte string. Padding to multiple of 4 bytes. Section contributions, section headers, file info, ts map, and EC info. Their sizes are found in the above header. Debug header, Stream numbers for Old Frame Pointer Omission, Exceptions, Fixups, Object Maps to and from Source, Section Headers, Token Ring IDs, Xdata, Pdata, New Frame Pointer Omission, and Section Header Origin. 2 bytes each. ==References== Microsoft documentation on DIA at Microsoft Learn Symbols and Symbol Files - Windows drivers at Microsoft Learn What's inside a PDB File? at C++ Team Blog, Microsoft Developer Blogs PDB structure according to LLVM
