From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PDB (Program Database)" |
|---|
| claim | "TPI (stream 2) and IPI (stream 4) start with a 56-byte header: version 20040203, header size 56, tiMin 0x1000, tiMac, record bytes, hash stream numbers, hash key size 4, 0x3FFFF buckets and three (offset, size) pairs into the hash stream; records follow at offset headerSize." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PDB (Program Database)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "TPI_Header" |
|---|
| size | "0x38" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "version" |
|---|
| notes | "20040203 (impv80) in all files; 19990903 impv70 older" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "header_size" |
|---|
| notes | "56" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "ti_min" |
|---|
| notes | "0x1000" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "ti_mac" |
|---|
| notes | "last index + 1" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "record_bytes" |
|---|
|
| offset | "0x14" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "hash_stream" |
|---|
| notes | "0xFFFF in stripped PDBs" |
|---|
|
| offset | "0x16" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "hash_aux_stream" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "hash_key_size" |
|---|
| notes | "4" |
|---|
|
| offset | "0x1C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "hash_buckets" |
|---|
| notes | "0x3FFFF in all files" |
|---|
|
| offset | "0x20" |
|---|
| size | 8 |
|---|
| type | "uint32_t[2]" |
|---|
| name | "hash_values" |
|---|
| notes | "offset, size in hash stream" |
|---|
|
| offset | "0x28" |
|---|
| size | 8 |
|---|
| type | "uint32_t[2]" |
|---|
| name | "ti_offsets" |
|---|
| notes | "(TI, offset) index for seeking" |
|---|
|
| offset | "0x30" |
|---|
| size | 8 |
|---|
| type | "uint32_t[2]" |
|---|
| name | "hash_adjusters" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct OffCb, struct TpiHash, struct HDR { vers, cbHdr, tiMin, tiMac, cbGprec, tpihash }" |
|---|
| repo | "https://github.com/microsoft/microsoft-pdb" |
|---|
| commit | "805655a28bd8198004be2ac27e6e0290121a5e89" |
|---|
| path | "PDB/dbi/tpi.h" |
|---|
| lines | "21-60" |
|---|
|
| type | "source" |
|---|
| detail | "impv40 19950410 ... impv70 19990903, impv80 20040203 = curImpv" |
|---|
| repo | "https://github.com/microsoft/microsoft-pdb" |
|---|
| commit | "805655a28bd8198004be2ac27e6e0290121a5e89" |
|---|
| path | "PDB/dbi/tpi.h" |
|---|
| lines | "168-177" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "pdbinfo.py: 58 PDBs, all header_size 56, version 20040203; walking (uint16 length, uint16 leaf) records from offset 56 ended exactly at ti_mac - ti_min records (up to 208,807 TPI records)." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "TPI stream header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T21:15:16.387Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T12:26:39.503Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read PDB/dbi/tpi.h at the cited commit: HDR {vers, cbHdr, tiMin, tiMac, cbGprec, TpiHash{sn, snPad, cbHashKey, cHashBuckets, OffCb offcbHashVals, offcbTiOff, offcbHashAdj}}; offsets 0x00-0x37 match the fact (sn/snPad are 16-bit, others 32-bit)." |
|---|
|
|
|---|