From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PDB (Program Database)" |
|---|
| claim | "A PDB module stream (number in the module's DBI record) is uint32 CodeView signature 4, then the module's symbol records up to cbSyms (counted from the stream start), cbLines bytes of C11 lines (0 in current files), cbC13Lines bytes of C13 subsections (lines 0xF2, file checksums 0xF4, inlinee lines 0xF6, cross-scope 0xF7/0xF8), then a uint32 size and the global references." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PDB (Program Database)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "PDB_ModuleStream" |
|---|
| size | "variable" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "signature" |
|---|
| notes | "4 = CV_SIGNATURE_C13" |
|---|
|
| offset | "0x4" |
|---|
| size | 1 |
|---|
| type | "uint8_t[]" |
|---|
| name | "symbols" |
|---|
| notes | "CodeView symbol records up to offset cbSyms" |
|---|
|
| offset | "cbSyms" |
|---|
| size | 1 |
|---|
| type | "uint8_t[]" |
|---|
| name | "c11_lines" |
|---|
| notes | "cbLines bytes" |
|---|
|
| offset | "cbSyms+cbLines" |
|---|
| size | 1 |
|---|
| type | "uint8_t[]" |
|---|
| name | "c13_lines" |
|---|
| notes | "cbC13Lines bytes of uint32 type, uint32 length subsections" |
|---|
|
| offset | "cbSyms+cbLines+cbC13Lines" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "global_refs_size" |
|---|
| notes | "then that many bytes of offsets into the symbol record stream" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "MODI_60_Persist: sn, cbSyms, cbLines, cbC13Lines of the module stream" |
|---|
| repo | "https://github.com/microsoft/microsoft-pdb" |
|---|
| commit | "805655a28bd8198004be2ac27e6e0290121a5e89" |
|---|
| path | "PDB/dbi/dbi.h" |
|---|
| lines | "1162-1192" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Full PDB with 402 modules: 399 module streams began with 4; symbol walks from offset 4 ended exactly at cbSyms in all; subsection walks of cbC13Lines ended exactly and contained 0xF2, 0xF4, 0xF6, 0xF7, 0xF8." |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Same 399 module streams: the uint32 after the C13 lines plus 4 plus that value equalled the stream size in all 399, and the value was a multiple of 4 (uint32 offsets)." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Module stream layout" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T21:21:13.226Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-17T21:21:28.815Z" |
|---|
| summary | "Add the test of the global references tail" |
|---|
| changed | |
|---|
|
|
|---|