Discussion:
Gdb and debug symbol in pdb
Sergey Tovpeko
2006-06-08 07:51:04 UTC
Permalink
Hi, folks!

I've a question about using gdb on windows. I'm debugging a
program produced by Microsoft compiler. It would be nice of GDB
to understand debug symbols in Microsoft-specific debug format (PDB).
Did anyone try to support this format in gdb? I know, it's private.
But Microsoft provides a big API for analyzing pdb format.

And sorry for my english.
Thanks.
Brian Dessent
2006-06-08 09:24:29 UTC
Permalink
Post by Sergey Tovpeko
I've a question about using gdb on windows. I'm debugging a
program produced by Microsoft compiler. It would be nice of GDB
to understand debug symbols in Microsoft-specific debug format (PDB).
Did anyone try to support this format in gdb? I know, it's private.
But Microsoft provides a big API for analyzing pdb format.
No, to my knowledge no one has ever tried to support PDB format in gdb.
It sounds like an extremely non-trivial undertaking. It would not just
be a matter of reading an undocumented file format. Gdb would have to
be taught all the details of the MSVC C++ ABI -- name mangling, vtable
layout, and so on. I suppose you could just support C only, but that
would make it useless for a great deal of code.

And on top of that the people who develop gdb are also those who
probably have the least desire to use MS proprietary compilers, as they
tend to have a stake in the gnu toolchain anyway. Besides, there are
already plenty of debuggers that understand PDB, both Microsoft and
third party, so it would be reinventing a wheel.

You might want to have this discussion on the gdb list, though I'm sure
it's come up before.

Brian
Tim Prince
2006-06-08 12:30:18 UTC
Permalink
Post by Brian Dessent
Post by Sergey Tovpeko
I've a question about using gdb on windows. I'm debugging a
program produced by Microsoft compiler. It would be nice of GDB
to understand debug symbols in Microsoft-specific debug format (PDB).
Did anyone try to support this format in gdb? I know, it's private.
But Microsoft provides a big API for analyzing pdb format.
No, to my knowledge no one has ever tried to support PDB format in gdb.
It sounds like an extremely non-trivial undertaking. It would not just
be a matter of reading an undocumented file format. Gdb would have to
be taught all the details of the MSVC C++ ABI -- name mangling, vtable
layout, and so on. I suppose you could just support C only, but that
would make it useless for a great deal of code.
And on top of that the people who develop gdb are also those who
probably have the least desire to use MS proprietary compilers, as they
tend to have a stake in the gnu toolchain anyway.
Perhaps implicit in Brian's response, there is little incentive for
anyone to do this, since generation of .pdb by open source compilers
will not be permitted. The obstacles to full functioning of .pdb with
commercial 3rd party compilers are high enough.
Sergey Tovpeko
2006-06-08 13:44:03 UTC
Permalink
Post by Tim Prince
Perhaps implicit in Brian's response, there is little incentive for
anyone to do this, since generation of .pdb by open source compilers
will not be permitted. The obstacles to full functioning of .pdb with
commercial 3rd party compilers are high enough.
Certanly! .pdb doesn't documented very well :-). Moreover, microsoft
changes its internal structures from version to version.

But, my point is to use gdb as alternative to microsoft windbg. In my case
I prefer GDB because of its open standards. Also I suppose GDB has
enough functionality to write something like extenstions, macroses to
enhance the specific analysis.

Sergey.

Loading...