Mail Archives: djgpp/2012/01/29/09:15:26
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 -