From: Brian Dessent <brian@de...> - 2008-07-03 22:30:49
Karthik Kailash wrote:
> I am cross compiling from linux to windows using the mingw32 tools. I
> need to generate pdb files for debugging on windows. Is there a way to
> do this?
Only the Microsoft tools use the proprietary PDB format. The GNU tools
use STABS or DWARF-2 for the debug information. There is no free
software to either read or write PDB, as far as I know. Besides, it
wouldn't be of use anyway since debug information is somewhat tied to
the internals of the compiler and it's likely that the Microsoft
debugger would not be able to make sense of gcc's debug data even if gcc
could write it in PDB format -- at least for C++ where the mangling and
ABIs are totally different.
From: Kai Tietz <ktietz70@go...> - 2010-08-27 06:57:52
2010/8/26 Greg Chicares <gchicares@...>:
> On 2010-08-26 21:03Z, Victor T. wrote:
>> Brian Dessent wrote:
>>> Besides, it wouldn't be of use anyway since debug information is somewhat
>>> tied to
>>> the internals of the compiler and it's likely that the Microsoft
>>> debugger would not be able to make sense of gcc's debug data even if gcc
>>> could write it in PDB format -- at least for C++ where the mangling and
>>> ABIs are totally different.
>> Can someone elaborate on this last point? I'm looking to write a tool for
>> debug format conversion for interoperability but what Brian mentioned here
>> has me concerned.
> C++ name-mangling and ABIs differ...see:
Well, I spent some time on this subject and you can find the results
for libmangle (it got a cygwin package already) and
for some work on PDB file format.
The libmangle can already decode MS encoded names back to human
readable names, and it would be possible to extend it so, that it can
transform mangled names (not complete but as far as possible) to gcc's
encoding. I simply didn't found any time here to continue on it. For
symbol aliasing in import-libraries I've added to gcc the thiscall
convention support (4.6) and to binutils dlltool/ld the feature of
'==' statement in .def files for this.
The PDB library is able to interprete some of the content of PDB file
formats (there are two AFAIK), but needs for sure extensions to. But
it can be used as base for a PDB/dwarf2 converted. The bad point about
PDB file format is, that it is pretty less documented, so a lot of
things are guess-works with verification by testing (as usual).
If you have interest on improving these libraries, feel free to contact me.
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
From: Victor T. <nabble-greatwolf@sp...> - 2010-08-30 22:22:42
I'm trying to find some documentation about how MinGW emits dwarf2 debug
symbols and how gdb reads them in. What format does the symbol file itself
have to be in in order for gdb to be able to work with it? I'm looking for
specifics like header fields that need to be present or set, section layouts
and structure etc. I need all this information
before I can write a tool that's capable of producing debug info that gdb
can work with.
Any suggestions on where I can look?
Note, I'm not asking about the dwarf2 format itself -- I've already reviewed
the dwarf2 specs. Rather I'm looking for information about the 'glue code'
required to get dwarf2 (and stabs to a lesser extent) to work under a win32
PE-COFF environment with a particular focus on gdb's symbol loading.
View this message in context: http://old.nabble.com/Generate-PDB-files-tp18268068p29577816.html
Sent from the MinGW - User mailing list archive at Nabble.com.