Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!LURCH.STANFORD.EDU!tiemann From: tiemann@LURCH.STANFORD.EDU (Michael Tiemann) Newsgroups: gnu.g++ Subject: Please describe how to use g++/gdb with COFF Message-ID: <8910261603.AA05478@lurch.Stanford.EDU> Date: 26 Oct 89 16:03:22 GMT References: <8910260105.AA04801@ttidca.TTI.COM> Sender: daemon@tut.cis.ohio-state.edu Reply-To: tiemann@lurch.stanford.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 36 >if you are afflicted with COFF (or its related diseases), the time >spent linking is among the least of your overall computer problems. I believe that the disease is not in COFF itself, but in the way ATT has chosen to make use of it. As pointed out by someone else, it is much more flexible than the other object file formats, as shown by the ease in which someone else in this newsgroup was able to use it for calling constructors and destructors. 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. 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. COFF is an intrinsic botch, so it is unfair to blame AT&T for more than just using it. I've been thinking of adding ".help" sections to my builds using coff and modifying tcsh to read these. Sort of a quick way of making programs be self-documenting. (I haven't figured out the format for these help sections yet, but I intend that it should be able to handle both positional and keyword arguments.) I don't know any way to do something this with the Berkeley loader without also having to change the man page (that is without changing it's specification). How about reading the definition of how stabs are used, and building extensions upon that? If you understood how stabs was extended to handle constructors and destructors, you could see how to extend it to handle a ".help" section. Michael