4

i have a Win32 compiler which, for years, has been able to create a DBG debug information file.

This has allowed debuggers, and tools like Process Explorer and Process Monitor to have access to symbol information:

enter image description here

i recently learned that Visual Studio's debugger no longer accepts DBG files, only undocumented Program Database (PDB) files:

enter image description here

Since Microsoft keeps the PDB format secret, i assume they have a tool that will allow me to convert existing debugging information to a PDB (so i don't learn the secrets of their file format).

Bonus Reading

Undocumented

Even though Microsoft has a GitHub repository for PDB, the spec remains completely undocumented. The files on their repository are incomplete. There are missing types and declarations.

And even though i've created a PDBViewer:

enter image description here

It doesn't get me anything - because Microsoft doesn't explain what any of it means.

The point isn't just to look at a PDB - we need to create one. And for that we need to know:

  • what goes in it
  • where
  • and what format
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
  • That `cv2pdb` program you mentioned appears to be the answer to your own question (since .dbg files are in CodeView format) – Ben Voigt Feb 13 '12 at 00:24

3 Answers3

0

The PDB format is now documented-through-code by Microsoft in a GitHub repository. LLVM also have a great overview, partly based on Microsoft's documentation.

That's not a complete answer because you'll still need to write the tool to do the conversion...

Marc Durdin
  • 1,675
  • 2
  • 20
  • 27
0

LLVM developers documented the PDB file format in order to make clang and lld able to read and produce PDB files. Microsoft's PDB Github repository was put up, in part, to support that work.

PDB is primarily a container for CodeView debug info, which is documented by Microsoft.

LLVM provides libraries for working with PDBs and COFF debug info, as well as command line tools for inspecting and generating them from YAML.

Adrian McCarthy
  • 45,555
  • 16
  • 123
  • 175
0

PDB is not documented, but you can collect very detailed information about the content of PDB files programmatically using the appropriate interfaces See Sample

mox
  • 6,084
  • 2
  • 23
  • 35
  • 1
    That would be like being able to understand the SQL Server database file format by running queries. – Ian Boyd Feb 13 '12 at 16:57