(Kein "Betreff")

root root@jacob.remcomp.fr
Thu Jan 29 04:47:00 GMT 1998


> 
> Hi,
> 
> as I got no reply until now, I try to resen this (slightly modified)
> message
> 
> Is it possible to debug executables which were produced by the MSVC++
> (DevStudio 97 Service Pack 2) compiler with gdb? As far as I know, gdb
> supports COFF. but when I load the executable, gdb complains about
> finding no debug information.

It finds no debug information it can understand, that is.
gdb uses (as for as I know) a format for the debug information called
"stabs", that was developed in Unix, and stores a textual representation
(mostly ascii) of the types and variables used in the program. In this
way the debugger can know what is going on.

MSVC compilers generate debug information in a format called NB09, a
mostly binary representation, and thus much more compact than stabs.
I have written a debugger for windows for my system lcc-win32. I used the
MSVC format, so my code is compatible with MSVC and can be debugged with
a real debugger. Cygnus choose to leave gdb alone, so gdb uses a format
that no one else in the windows world will understand.

> 
> As far as I found out gdb is capable of loading and executing the
> binary. The only thing I would need, is a converter that makes a gdb
> symbol file out of the *.pdb files of the MSVC++ compiler. 

The .pdb format is (as far as I know) undocumented, as opposed to the NB09.

> Has anybody
> written such a program or is doing so? 

I have proposed several times to the people of cygnus to write a converter
but they manifested no interest. Obviously I will not do it for free, since
gdb is a product commercialized by cygnus and I do not feel like working for
free so somebody else makes money out of it. Nothing against people making
money obviously, but if I contribute to a commercial undertaking I want my
share of it.

> Besides the fact that the .pdb
> files are MS and binary, it should be just a question of demangling the
> MS names and remangle them in a way gdb understands them or?
> 

Making that program is a very difficult undertaking. I think it would take
me 2 months full time. It is 'just a question' of:

1) Reading all the symbolic information from the program database.
2) Reading the type information.
3) Reading the line number information.
4) Reading the files information.
5) Generating the stabs information.
and finally
6) Reorganize the executable file so that incorporates the .stabs information
   in it.

It is just a question of writing it of course... :-)

-- 
Jacob Navia	Logiciels/Informatique
41 rue Maurice Ravel			Tel 01 48.23.51.44
93430 Villetaneuse 			Fax 01 48.23.95.39
France
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list