Overview
This app builds class/struct header stubs by reading cache files derived from PDB symbols. It helps you inspect fields, bitfields, and function signatures quickly, and compare generated headers against pasted ones.
Getting Started
- Populate the Cache folder (see Caching Pipeline below).
- Open the app and use the right sidebar to Generate or Search.
Tip: The header shows live cache counts and whether PIN protection is enabled.
UI Guide
- Generate: Enter a class/struct name (e.g., APrimalDinoCharacter) and click Generate. The full highlighted header appears with a summary of fields/bitfields.
- Search Members/Functions: Paste Class.Member or a function signature to find and jumpstart generation.
- Compare: Paste another header and click Compare to see presence diffs for fields/bitfields/functions.
- History: Previously generated headers are listed. Download or compare a saved header. Clear and remove actions may be PIN-protected.
PDB Reading, DIA, and msdia140.dll
PDB (Program Database) files store debug symbols: type info, function signatures, and more. Microsoft’s DIA SDK (Debug Interface Access) provides COM interfaces to read PDBs programmatically.
- msdia140.dll: The COM provider for DIA. It’s installed with Visual Studio or Windows SDK.
- Access Flow (high level):
- Create DIA data source via COM (msdia140.dll).
- Load the target PDB into the DIA session.
- Traverse symbol trees to collect classes/structs, members, bitfields, and functions.
- Write results into cache files for fast, repeatable reads (see below).
Note: Reading shipped game PDBs may require matching build versions and appropriate symbol access rights.
Caching Pipeline
The backend reads structured cache files from the Cache directory. Typical files:
- cached_offsets.cache / cached_offsets.txt: Maps Class.Member or Class.Function(signature) to offsets; text form is convenient for inspection.
- cached_bitfields.cache: Bitfield metadata (offset, bit position, count, length).
- cached_types.cache / cached_types.txt: Resolved field types (e.g., float, uint32).
- cached_inheritance.cache / cached_inheritance.txt: Derived → Base relationships to enrich headers.
Workflow: Your PDB extractor (using DIA) populates these caches. The API consumes them to render headers and summaries. Missing types are handled conservatively; when available, types caches improve fidelity.
Troubleshooting
- No types: Ensure cached_types.cache or cached_types.txt is written by the extractor.
- Bitfields missing: Verify cached_bitfields.cache exists and matches your target version.
- Caches outdated: Click Reload Caches in the header to refresh.
- PIN errors: Confirm .env contains HISTORY_CLEAR_PIN, restart backend, and re-open the app.
- DIA COM issues: Re-register msdia140.dll, use Admin prompt, and ensure Visual Studio/DIA SDK is installed.