cv2pdb icon indicating copy to clipboard operation
cv2pdb copied to clipboard

cv2pdb converted a PDB that neither IDA nor WinDbg recognize

Open Zero-Tang opened this issue 2 years ago • 5 comments

I'm working with QEMU. I added --enable-debug and --enable-debug-info options in configuring the QEMU maker. After cv2pdb extracted a PDB file, neither IDA nor WinDbg can obtain debug symbol from it. This PDB file must be weird because DIA2Dump can see all symbol information.

Zero-Tang avatar Apr 17 '23 17:04 Zero-Tang

It's hard to say without further information. I suspect the executable and the debug information are quite large for qemu. Can you provide an example? Can you reduce it to something managable?

Maybe cvdump.exe from https://github.com/microsoft/microsoft-pdb/tree/master/cvdump can detect inaccuracies in the resulting PDB file.

rainers avatar Apr 18 '23 05:04 rainers

I don't think I saw inaccuracies from cvdump. It seems cvdump has similar functionality to dia2dump. Anyway, here is an example. qemu-system-x86_64.2.zip Symbols can be dumped by cvdump and dia2dump (and I guess that's accurate because I can see my added functions), but ida and windbg just can't load them.

Zero-Tang avatar Apr 18 '23 05:04 Zero-Tang

I can load your pdb in an ancient version of IDA, but the latest one reports:

PDB: using PDBIDA provider
PDB: loading C:\tmp\qemu\qemu-system-x86_64.2.pdb
PDB: There is no IPI stream
PDB: loaded 13092 types
PDB: total 0 symbols loaded for "C:\tmp\qemu\qemu-system-x86_64.2.pdb"

So type info seems to be ok, but symbols are not loaded, maybe because an "IPI stream" is missing. No idea what this is, but there is a small disabled code segment at https://github.com/rainers/cv2pdb/blob/master/src/cv2pdb.cpp#L189 that might create it (but leave empty). Maybe try enabling these lines.

rainers avatar Apr 18 '23 06:04 rainers

No it didn't work. I probably have to find another way to get a usable pdb.

Zero-Tang avatar Apr 18 '23 17:04 Zero-Tang

qemu-system-x86_64.zip In case you need a sample, I post the QEMU with dwarf symbols here.

Zero-Tang avatar Apr 19 '23 13:04 Zero-Tang