🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++
Article #203

Re: Please describe how to use g++/gdb with COFF

#203
From: Ron Guilmette
Date: Sat, 28 Oct 1989 02:56
34 lines
2401 bytes
In article <8910261603.AA05478@lurch.Stanford.EDU> tiemann@lurch.stanford.edu writes:
>
>The person to whom you are referring, Ron Guilmette, did manage to get
>something working, but his way of getting it working was equivalent to
>hacking stabs the way that GNU does, so COFF gets no extra there. 
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^

The (only) notable advantage that COFF has over a.out is that COFF format
allows for the possibility of "extra" user-defined sections (i.e. above and
beyond the normal .text, .data, and .bss sections).  I can think of
a couple of zillion uses for this particular feature.  It allows you to
get the linker to amalgamate little chucks of stuff for several input
(object) files into single big chunks in the output (executable) files.
This can be damn useful, not only for shared-library initialization,
but also (as I have demonstrated) for construction & destruction of
global objects.

>On the other hand, COFF hard-wires its type representation system to a
>four-bit encoding, all of which just happen to be taken by C.  This
>lack of extensibility precludes its use as a representation for
>symbolic information of C++ programs, since it is impossible to
>represent things like virtual function, base classes, destructors,
>member functions, pointers to members, etc.

Absolutely true.  The debugging information in COFF is a disaster!!!
Due to the fixed fields and lack of expandability, the COFF debug
stuff cannot even handle full ANSI-C (which requires up to 12-levels
of "pointer-ness" for data types), let alone all of the "data type"
information required to support C++ (e.g. "reference-ness").

If only we could (a) add extra sections onto a.out, and (b) get all the
kernels to accept a.out for executable files, I could die a happy man.

// rfg
Technical Details
Message-ID: <1989Oct27.195605.26334@paris.ics.uci.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!usc!orion.oac.uci.edu!uci-ics!rfg
References: <8910260105.AA04801@ttidca.TTI.COM> <8910261603.AA05478@lurch.Stanford.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!usc!orion.oac.uci.edu!uci-ics!rfg
From: rfg@ics.uci.edu (Ron Guilmette)
Newsgroups: gnu.g++
Subject: Re: Please describe how to use g++/gdb with COFF
Message-ID: <1989Oct27.195605.26334@paris.ics.uci.edu>
Date: 28 Oct 89 02:56:05 GMT
References: <8910260105.AA04801@ttidca.TTI.COM> <8910261603.AA05478@lurch.Stanford.EDU>
Reply-To: Ron Guilmette <rfg@ics.uci.edu>
Distribution: gnu
Organization: University of California, Irvine - Dept of ICS
Lines: 34