File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
Code
  • Source code
  • Bytecode
  • Programs & libraries
  • Object files
  • Debug info
  • Firmware & ROMs
  • Notebooks
  • Shaders
  • Build files
  • Packages & installers
  1. Home
  2. Code
  3. Debug info
  4. PDB
.PDB
  • Overview

.PDB

Microsoft program database

Introduction

A .pdb file holds the debug information for a Windows program or library: the names and types of its functions and variables and the source line for each piece of code. The Microsoft linker writes it beside the PE file, and the program records the PDB’s name and a matching GUID, so a debugger can find the right one, even on a symbol server.

The extension has other uses. Chemistry software uses .pdb for Protein Data Bank structures, which are text files, and Palm OS used it for its databases.

Software

  • Visual Studio (Windows)
  • WinDbg (Windows)
  • LLVM, with llvm-pdbutil (Windows, macOS, Linux)
  • Ghidra (Windows, macOS, Linux)
  • IDA Pro (Windows, macOS, Linux)
  • x64dbg (Windows)

Structure

A modern PDB file is a small file system called MSF (multi-stream format). The file is divided into fixed-size blocks, usually 4096 bytes. The first block is the superblock: the 32-byte magic Microsoft C/C++ MSF 7.00\r\n\x1ADS\0\0\0, then the block size, the number of blocks and the location of the stream directory. The directory lists the streams in the file and which blocks each one occupies, so a stream’s blocks need not be next to each other.

The streams are numbered. Stream 1 holds the PDB’s version, age and GUID; stream 2 the type information; stream 3 the debug information about each compiled module and its source lines; stream 4 the IDs of functions and other items. Further streams are found by name or through the debug information stream.

  1. 0superblock: magic, block size, block counts, directory locationblock 0
  2. …free block mapsblocks 1 and 2
  3. …stream directory: stream sizes and their block numbersvaries
  4. …streams: PDB info, types, debug info, IDs, symbols, namesvaries
A PDB file: numbered streams spread over fixed-size blocks.
© 2026 fileformats.org About Contact Made by Lewpen