Search code examples
visual-c++pdb-files

Read VC++ PDB source files bounds and lines


So I reverse engenering a program which have a PDB included with functions, source files and global variables symbols. I use IDA PRO which includes the functions and variables names from the PDB but I don't know to what source file each function belongs. Also somewhere I read that this file also includes an compiler paramters for each source file. The problem is nowhere in the internet I can't find a tool which read all the information from the Program DataBase. Also I founs a book which describes the format (Undocumented Windows 2000 Secrets). Does somebody knows a program which may help me?


Solution

  • See "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\DIA SDK\Samples\DIA2Dump". It uses DIA to access the PDB and can show a lot of info.

    If you'd rather not mess with compiling stuff, you can try dbh.exe from Debugging Tools for Windows. Its commands are somewhat cryptic, but it does have functionality to show source file/line info.