Convert DBG into PDB?
Asked Answered
L

3

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
Lebbie answered 12/2, 2012 at 16:20 Comment(1)
That cv2pdb program you mentioned appears to be the answer to your own question (since .dbg files are in CodeView format)Medin
N
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

Nilla answered 13/2, 2012 at 14:31 Comment(1)
That would be like being able to understand the SQL Server database file format by running queries.Lebbie
S
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...

Shirleeshirleen answered 16/3, 2020 at 6:19 Comment(0)
E
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.

Elater answered 16/3, 2020 at 15:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.