Search code examples
windowsdebuggingwinapidebug-symbols

How can I know which PDB file contains type information for a given struct?


I'm translating some Windows header files to Delphi. In order to verify alignment of related C structs, I need to dump certain PDB files to see the associated type information. To do this, I tried to use PdbXtract, but this tool asks me to select a PDB file to inspect. How do I know which PDB file contains the desired struct definition?


Solution

  • After investigating PDB files using hex editor, I figure out to know which PDB file contains the desired struct definition, by using a grep-like tool to search for PDB filenames containing the following regex pattern:

    \x15\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00_Struct_Name\x00