This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Remove current_gdbarch register handling from symbol readers


Eli Zaretskii wrote:

> What about the COFF related parts? were they tested?

Unfortunately not, as I don't have any platform available that
uses COFF.

> I recently found a few places where COFF support suffered some serious
> bitrot, and I think that's because it is not tested enough.  Is there
> some Posix platform that supports COFF, and where we could run the
> test suite?

I've had a look through current gcc and binutils sources to try to
figure out were COFF is supported.  GCC enables the "SDB" (COFF)
debug format (sdbout.c) for the following platforms:

arm*-wince-pe*)
arm-*-pe*)
i[34567]86-*-pe | i[34567]86-*-cygwin*)
i[34567]86-*-mingw* | x86_64-*-mingw*)
i[34567]86-*-interix3*)
i[34567]86-pc-msdosdjgpp*)

alpha*-*-openbsd*)
mips*-*-openbsd*)

(This is the complete list for mainline GCC.  Past GCC versions
supported additional COFF targets, e.g. i386 a.out Linux, and
some bare-metal COFF targets.  All those have been removed.)

The alpha/mips OpenBSD targets are a bit misleading, as they do
not actually use the COFF file format, but ELF.  However, there's
apparently a hack in GAS for these targets where it expects GCC to
generate COFF/SDB style debugging pseudo-ops, and then translates
those to the ECOFF debugging format embedded in ELF.  As far as GDB
is concerned, such files should be processed by elfread.c/mdebugread.c,
not coffread.c.

Only the Windows/DOS related targets remain.  Of those, all the
-pe / -mingw / -cygwin / -interix targets actually use the PE
file format, not "real" COFF, and GCC will default to generate
stabs or DWARF-2 for those.  It seems possible to use -gcoff to
force GCC to emit COFF/SDB debug info; I'm not sure if this will
actually work with PE files ...

The only target for which GCC by default generates COFF/SDB debug
info does indeed appear to be -msdosdjgpp ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]