[PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp)

Eli Zaretskii eliz@gnu.org
Sun Apr 18 17:00:00 GMT 2004


> Date: Mon, 5 Apr 2004 17:46:09 -0500 (CDT)
> From: Brian Ford <ford@vss.fsi.com>
> 
> > > I just realized that DWARF 2 is not the default.
> >
> > Well, it is in DJGPP: GCC 3.2 and later use DWARF-2 by default.  So I
> > guess, for the random DJGPP user, DWARF-2 is much more frequent these
> > days that either -gstabs+ or -gcoff.
> 
> I'm confused here.  I just did another pass through the gcc sources
> (3.4 branch in this case) and looked at all the djgpp config files:
> ford@fordpc ~/downloads/gcc/gcc/config
> 
> $ fgrep DEBUGGING i386/xm-djgpp.h i386/i386.h dbxcoff.h i386/unix.h
> i386/bsd.h i386/gas.h i386/djgpp.h
> dbxcoff.h:#define DBX_DEBUGGING_INFO 1
> dbxcoff.h:#ifndef PREFERRED_DEBUGGING_TYPE
> dbxcoff.h:#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
> i386/gas.h:#define SDB_DEBUGGING_INFO 1
> i386/djgpp.h:#define DWARF2_DEBUGGING_INFO 1

i386/djgpp.h in the GCC 3.3.3 distribution I have says:

    /* Support generation of DWARF2 debugging info.  */
    #define DWARF2_DEBUGGING_INFO 1

    /* Use DWARF2 debugging info by default: comment out following  */
    /* 2 lines to default to COFF debugging info  */
    #undef PREFERRED_DEBUGGING_TYPE
    #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG

So the preferred debug info is DWARF-2.

It sounds like the person who ports GCC for DJGPP edits djgpp.h before
building, because the official GCC tarball on ftp.gnu.org doesn't
redefine PREFERRED_DEBUGGING_TYPE (and neither does it define register
renumbering I cited in the previous mail, in response to Jim's
question).  This could explain why you are confused.



More information about the Gdb-patches mailing list