Format:PE (Portable Executable)/Debug directory
Data directory 6 of a PE file: 28-byte IMAGE_DEBUG_DIRECTORY entries pointing to the CodeView record (RSDS: PDB GUID, age and path, the key for symbol servers), POGO (the list of COFF groups such as .text$mn, .rdata$r, .CRT$XCA with their RVAs), REPRO (deterministic-build hash that replaces time stamps), VC_FEATURE and extended DLL characteristics.
Layout
Data directory 6 points to an array of 28-byte IMAGE_DEBUG_DIRECTORY entries (directory size = 28 x count), usually inside .rdata:
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | Characteristics (0) |
| 4 | 4 | TimeDateStamp (equal to the file header's in the files checked) |
| 8 | 2+2 | MajorVersion, MinorVersion |
| 12 | 4 | Type |
| 16 | 4 | SizeOfData |
| 20 | 4 | AddressOfRawData (RVA, 0 if the data is not mapped) |
| 24 | 4 | PointerToRawData (file offset) |
Types: 1 COFF, 2 CODEVIEW, 3 FPO, 4 MISC (.dbg file name), 5 EXCEPTION, 6 FIXUP, 7/8 OMAP to/from source, 9 BORLAND, 10 RESERVED10, 11 CLSID, 12 VC_FEATURE, 13 POGO, 14 ILTCG, 15 MPX, 16 REPRO, 17 embedded portable PDB (.NET), 19 PDB checksum (.NET), 20 EX_DLLCHARACTERISTICS. 12-15 are not in Microsoft's PE format document; their names come from winnt.h and pefile.
CodeView (PDB reference)
The type 2 entry points to a CodeView record naming the PDB:
- RSDS (PDB 7.0, an MSF 7.00 Format:PDB (Program Database), or a Format:Portable PDB when MinorVersion is 0x504D; Microsoft link since Visual C++ .NET, lld-link, and also GNU ld in the MinGW-w64 and MSYS2 files checked, where the path may be empty):
char sig[4] = "RSDS"; GUID guid; uint32 age; char path[](UTF-8, NUL-terminated; 24 bytes + path). The GUID is stored as a Windows GUID: Data1 (uint32), Data2, Data3 (uint16) little endian, then 8 bytes as-is. - NB10 (PDB 2.0, VC6 era, small-MSF "program database 2.00" files):
"NB10"; uint32 offset (0); uint32 signature (a time stamp); uint32 age; char path[].
The path is whatever the linker was given, often an absolute build path (D:\a\_work\...\obj\foo.pdb) that reveals project names and build machines; Microsoft's own files carry only the file name (kernel32.pdb for the x64 kernel32.dll, wkernel32.pdb for the 32-bit copy in SysWOW64). Layout as a fact: Fact:PE (Portable Executable)/struct/CV INFO PDB70 (RSDS). The GUID and age are matched against the PDB info stream and the DBI header of the PDB (Format:PDB (Program Database)#Matching a PDB to an executable).
Symbol server paths
A symbol server (Microsoft's https://msdl.microsoft.com/download/symbols, Mozilla's, Chromium's) stores files under <name>/<key>/<name>:
- PDB: key = the GUID as 32 uppercase hex digits (Data1 as 8 digits, Data2 and Data3 as 4, then the 8 bytes in order), followed by the age in hex without leading zeros. Example: a Windows 11 x64 kernel32.dll references
kernel32.pdbwith keyE8C3A48CAC7EB60D8781D8C10020C44F1(age 1), i.e.kernel32.pdb/E8C3A48CAC7EB60D8781D8C10020C44F1/kernel32.pdb; test vectors in Fact:PE (Portable Executable)/behavior/Symbol server keys. pefile builds the same string inSignature_String. - PE file itself (to fetch a binary from a crash dump's module list): key = TimeDateStamp as 8 uppercase hex digits followed by SizeOfImage in hex, e.g.
chrome.exe/54E3AECFd3000/chrome.exein Chromium's RetrieveSymbols documentation.
Matching a local PDB to an executable requires both GUID and age to match; a PDB rebuilt from the same sources has a new GUID unless the build is reproducible.
REPRO (deterministic builds)
A type 16 entry means the build was deterministic (link /Brepro, lld-link /Brepro, also used for all Windows 10/11 system files): Microsoft's document says time stamps are then filled with "part or all the bits" of a hash. The entry's data is empty (older linkers) or uint32 length followed by the hash (32 bytes, apparently SHA-256). Observed on 3455 Windows 11 and third-party DLLs with a 32-byte REPRO hash:
- the file header TimeDateStamp (and the debug entries' TimeDateStamp) = bytes 28-31 of the hash, little endian (3455 of 3455);
- the CodeView GUID = bytes 0-15 of the hash (3327 of 3327 that had an RSDS record).
So a TimeDateStamp such as 1973-09-19 (Windows 11 x64 kernel32.dll) is not a date, and symbol-server keys of reproducible builds are derived from the content hash. The x64 build 32.2.2 of Software:OBS Studio is another example of such a non-date stamp.
POGO and VC_FEATURE
- POGO (type 13), written by Microsoft link with
/GL(LTCG) or PGO: a uint32 signature, then records{uint32 rva; uint32 size; char name[]}padded to 4 bytes, listing every COFF group (subsection) of the image in address order:.text$mn(normal code),.text$x(exception funclets),.text$di/.text$yd(dynamic initializers/atexit destructors),.text$lp00SPGO(PGO-ordered code),.rdata$r(RTTI),.rdata$zzzdbg(debug directory data),.idata$5(IAT),.CRT$XCA-$XCZ(initializer tables),.xdata,.pdataand so on. The signature dword, read as ASCII bytes in file order, isGCTL(value 0x4C544347, "LTCG") orOGPS(0x5350474F, "SPGO"), or zero; Unverified: classic instrumented-PGO builds usePGU. This gives the boundaries of initializer tables, RTTI, exception data and the IAT without any symbols. Seen in 742 of 800 Windows 11 System32 DLLs (367 GCTL, 346 OGPS, 29 zero) and in 492 of 600 sampled executables, where.text$mn,.rdata$zzzdbgand.idata$5were in every list,.text$xin 476,.CRT$XCA/$XCZin 486,.text$diin 355 and.rdata$rin 282. - VC_FEATURE (type 12): five uint32 counts written by Microsoft link (33 of 800 System32 DLLs). Unverified: they count objects built by pre-VC++ 11.00 compilers, C/C++ objects,
/GS,/sdland guardN objects, the labelsdumpbin /headersprints for this entry. - EX_DLLCHARACTERISTICS (type 20): a uint32 of extended flags, bit 0
CET_COMPAT(shadow stack compatible, link/CETCOMPAT). Windows 11 system files carry0x81or0x80; Unverified: 0x80 is the newerHOTPATCH_COMPATIBLEflag of recent SDK headers (check winnt.h of SDK 10.0.26100).
Portable PDB entries (.NET)
Managed (.NET) PEs built by Roslyn use three more entry forms, specified in dotnet/runtime docs/design/specs/PE-COFF.md:
- CodeView with MinorVersion 0x504D ("PM"): same RSDS record, but the PDB is a Format:Portable PDB; MajorVersion = Portable PDB version (0x0100), Age = 1, and the PDB is matched by GUID + the entry's TimeDateStamp (the 20-byte PDB id) instead of GUID + age (Fact:Portable PDB/identification/Portable CodeView entry). ReadyToRun assemblies often carry a second, minor-0 CodeView entry naming
<name>.ni.pdbfor their native code. - Type 17, embedded Portable PDB:
MPDB, uint32 uncompressed size, raw DEFLATE data (Fact:Portable PDB/struct/Embedded Portable PDB blob); the stamp is 0, minor version 0x0100. - Type 19, PDB checksum: NUL-terminated algorithm name (
SHA256,SHA384,SHA512) followed by the hash of the PDB with its id zeroed; in deterministic builds the PDB id is derived from that hash (Fact:Portable PDB/behavior/PDB id derived from the checksum).
In the .NET SDK 10.0.400 (2521 managed DLLs) the common combinations were REPRO only (1809, ReadyToRun framework files), portable CodeView + REPRO + checksum (276), Windows CodeView only (212) and both CodeViews + REPRO + checksum (122); 38 also embedded their PDB.
Code & repositories
- pdbinfo (Python) — Reads a native Microsoft PDB (MSF 7.00) with the standard library only: superblock, stream directory, PDB info stream (version, GUID, age, named streams, feature codes, symbol-server key), DBI…
Evidence & references
- Microsoft "PE Format", section "The .debug Section": entry layout, types 0-11, 16, 17, 19, 20 and the REPRO paragraph.
- pefile at commit 58186a9: debug types lines 225-244,
IMAGE_DEBUG_DIRECTORYlines 2643-2655, RSDS/NB10 parsing andSignature_Stringlines 4444-4525. - Chromium tools/win/RetrieveSymbols/ReadMe.txt (73.0.3683.86): PDB and PE symbol-store keys.
- REPRO, POGO, VC_FEATURE and EX_DLLCHARACTERISTICS observations: Code:PE (Portable Executable)/peinfo (Python) and small scripts over a Windows 11 installation (October 2026); RSDS keys of peinfo and pefile agree on every file compared.