delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/01/28/03:18:42

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Sat, 28 Jan 2012 10:16:20 +0200
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: Abort when compiling using COFF debug format (-gcoff)
In-reply-to: <f29ff743-4470-4cc9-8307-47ee7359dbcf@b23g2000yqn.googlegroups.com>
To: djgpp AT delorie DOT com
Message-id: <8339b0z1gr.fsf@gnu.org>
MIME-version: 1.0
X-012-Sender: halo1 AT inter DOT net DOT il
References: <201201262112 DOT 52030 DOT juan DOT guerrero AT gmx DOT de> <83wr8eywzf DOT fsf AT gnu DOT org> <4faf5c37-ca50-4bd0-9081-3ada327099a5 AT h6g2000yqk DOT googlegroups DOT com> <83sjj1zlmn DOT fsf AT gnu DOT org> <f29ff743-4470-4cc9-8307-47ee7359dbcf AT b23g2000yqn DOT googlegroups DOT com>
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id q0S8ISw6029690
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Rugxulo <rugxulo AT gmail DOT com>
> Date: Fri, 27 Jan 2012 18:36:37 -0800 (PST)
> 
> On Jan 27, 12:48 am, Eli Zaretskii <e DOT  DOT  DOT  AT gnu DOT org> wrote:
> > > From: Rugxulo <rugx DOT  DOT  DOT  AT gmail DOT com>
> > > Date: Thu, 26 Jan 2012 15:01:08 -0800 (PST)
> >
> > > > Sounds like the COFF debug info generation has bit-rotted in GCC.
> > > > Nothing new here, no other platform uses COFF AFAIK.
> >
> > > What about ECOFF and XCOFF? (Tru64 ?? AIX ??) And I'd assume PE/COFF
> > > still uses most of the same COFF sources too. (Or did you only meant
> > > COFF debug info?
> >
> > Yes, I only meant COFF debug info, and I even wrote that explicitly
> > (see above).
> 
> Well, I was confused by your "no other platform uses COFF AFAIK"
> statement.

Sorry about the confusion, I meant COFF debug info there as well.

> > > Dunno, it has vaguely worse support for C++ by default, so perhaps
> > > that's why.) But yeah, GCC and BinUtils seem to focus mostly on ELF
> > > these days (see Gold linker).
> >
> > Again, this is not about the object format, this is about debug info
> > format.  AFAIK, MinGW uses PE/COFF for the object format, but defaults
> > to DWARF for debug format.
> 
> You mean DWARF-2 plus extensions, right?

DWARF 2 or newer (the latest is DWARF 4, AFAIK).  The default in GCC
depends on the version and the platform.

> I honestly don't know who uses COFF debug info. I don't know if Cygwin
> or MinGW support it, even optionally.

The MinGW GCC does support it, AFAICS, at least with GCC 3.4.2 which I
use.  I just compiled a small program with -gcoff and successfully
stepped through it with the MinGW build of GDB 7.4.

> Presumably they generate the same as MS (CodeView??) in order to be
> compatible

No, they don't generate PDB, because that proprietary format doesn't
have freely available description, and GDB does not support it (for
the same reason).  MinGW defaults to DWARF these days (it used to
default to stabs in earlier versions of GCC).

> Honestly, Eli, I thought GNU Emacs (at least DJGPP) used "-gcoff".
> (Was that for unexec support?) Has that changed?

No, it hasn't changed.  See msdos/sed1v2.inp script, which is run by
config.bat, and edits CFLAGS in src/Makefile to include -gcoff.

Again, this is only for the DJGPP build of Emacs; the MinGW build uses
the "-gdwarf-2 -g3" compiler switches.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019