wbenny / pdbex

pdbex is a utility for reconstructing structures and unions from the PDB into compilable C headers
MIT License
814 stars 160 forks source link

Write the corrected name for unnamed enums #4

Closed arilou closed 5 years ago

arilou commented 5 years ago

The produced header was invalid when i ran it against a windows 10 ntoskrnl pdb, the PDB contained an unnamed enum which did not have a base typedef typedef enum /_TAG_UNNAMED_1 WAS MISSING/ { KTMOH_CommitTransaction_Result = 1, KTMOH_RollbackTransaction_Result = 2, } TAG_UNNAMED_1, *PTAG_UNNAMED_1;

Resulting in the following struct: typedef struct _KTRANSACTION_HISTORY { / 0x0000 / enum _TAG_UNNAMED_1 RecordType; / 0x0004 / uint32_t Payload; } KTRANSACTION_HISTORY, PKTRANSACTION_HISTORY; / size: 0x0008 */

to fail the compilation.

wbenny commented 5 years ago

Thank you!