delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2012/01/29/09:15:26

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Abort when compiling using COFF debug format (-gcoff)
Date: Sun, 29 Jan 2012 05:43:14 -0800 (PST)
Organization: http://groups.google.com
Lines: 64
Message-ID: <23088c26-d434-4679-b7dd-fdd5459c9ad4@h3g2000yqe.googlegroups.com>
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>
<8339b0z1gr DOT fsf AT gnu DOT org>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1327845470 23710 127.0.0.1 (29 Jan 2012 13:57:50 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sun, 29 Jan 2012 13:57:50 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: h3g2000yqe.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HNKUARELSC
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7
(KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7,gzip(gfe)
Bytes: 4048
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q0TEF13X023194
Reply-To: djgpp AT delorie DOT com

Hi,

On Jan 28, 2:16 am, Eli Zaretskii <e DOT  DOT  DOT  AT gnu DOT org> wrote:
> > From: Rugxulo <rugx DOT  DOT  DOT  AT gmail DOT com>
> > Date: Fri, 27 Jan 2012 18:36:37 -0800 (PST)
>
> > 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.

Guess so. But I don't see any obvious way to later on tell what
specific debug info was generated at compile time. ("file" apparently
doesn't tell, at least not on .EXEs.)

> > 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.

Good to know.

> > 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).

Yeah, stabs is old but still vaguely supported by some tools.

http://xkcd.com/927/

I don't know exactly, but OpenWatcom and YASM both optionally support
Codeview. The former claims support for CV4, NB05, NB09 and points to
documentation. It's apparently only supported because of
"interoperability", so DWARF 2 has been default since 11.0. (Also
supports "obsolete" "watcom" format.)

http://www.openwatcom.org/ftp/devel/docs/CodeView.pdf
http://www.openwatcom.org/index.php/Debugging_Format_Interoperability

They do go on to say they'd like to one day add .DBG and .PDB support
(NT-based?), supposedly semi-documented in _Undocumented Windows 2000
Secrets_ (gotta love it, heh, and free .pdf available, apparently).

http://sveta.rawol.com/?topic=2

> > 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.

Admittedly, I don't do a lot of debugging, at least not inside a
debugger. Usually trial and error, printf(), etc. is good enough for
my simplistic needs. (Unless dinking around in raw assembly where it's
mandatory.)

- Raw text -


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