[comp.archives] [gnu.gcc.help] Re: GNU and COFF

mb@ttidca.TTI.COM (Michael Bloom) (10/26/90)

Archive-name: gnu-coff/24-Oct-90
Original-posting-by: mb@ttidca.TTI.COM (Michael Bloom)
Original-subject: Re: GNU and COFF
Archive-site: tut.cis.ohio-state.edu [128.146.8.60]
Archive-directory: /pub/gnu
Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti)

In article <9010182029.AA12884@aeneas.MIT.EDU> XITITKUN%DDATHD21.BITNET@MITVMA.MIT.EDU writes:
	>We are porting gcc and g++ to a couple of Unix workstations here in
	>Darmstadt. The workstations are running a version of Unix System V.
	>So far, gas-1.36 together with the gnucoff patches and gcc-1.37.1
	>have been installed. But we are only able to work with the
	>COFF_ENCAPSULATEd format. Is there a way to get gas to output binaries
	>in a more useful COFF format?

Where did you get a copy of the patch set that did not also contain
the patches to gdb (I'm inferring from your statements that this is
the case) to process dbx stabs in coff files? Please ask anyone
providing the patches in such a form to provide the complete patch
set, not just the gas patches. And if they have a version that
predated the one in which the need to use collect was made
unnecessary, please ask them to update to the current version.

You can pick up the current version of my coff patch set from either uunet
or tut.cis.ohio-state.edu. If you look elsewhere, make sure that
the file gnu-coff.tar.Z is 167832 bytes, as in:
        -rw-rw-rw-  1 uucp       167832 Sep 23 23:07 gnu-coff.tar.Z
(Sept 23 is when I sent them to ohio-state).

The gdb portion of the patches contains all that is needed to make
dbxread process the dbx symbols in the coff files. The routine
fill_symbuf has been conditionally modified to call a routine in
coff-dbx.c to read in the coff symbols and normalize them to the form
understood by the rest of dbxread.c. (fill_symbuf is also where you
would add a call to a routine to do byte swapping for cross-debugging).
There are other changes, but they are almost all bug fixes taken 
from an as-yet unreleased version of gdb).

	>That is, in such a way that the output
	>can be processed by a debugger like sdb.

For your users who refuse to stray from sdb and are using just gcc and
not g++, might I recommend Loic Dachary's patches which have been
posted to alt.sources? These handle sdb style debug symbols, rather
than dbx symbols.

For g++, however, you really want dbx debug info, not sdb debug info.
Sdb info cannot express all that is needed for proper debugging of
C++, and has no mechanism for distinguishing between code from the
main source file and code from #included source files, resulting in
lines from the wrong source files being displayed when trying to stop
in or step through code defined in #included files.