From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geoff Keating To: gcc-patches@gcc.gnu.org Cc: gdb@sources.redhat.com Subject: Change rs6000 ELF targets to use DWARF2 by default in GCC. Date: Sun, 12 Aug 2001 23:34:00 -0000 Message-id: <200108130651.XAA07256@geoffk.org> X-SW-Source: 2001-08/msg00114.html I understand that while DWARF2 may be bigger, it is also more complete, and in particular it has a better chance of dealing with the new optimisations. I would rather better debugging information than smaller debugging information, and those who disagree can always use -g1 (or -gstabs for that matter). Tested on powerpc-eabisim. I didn't test gdb as I can't tell which failures would be "normal" for dwarf2. I am nonetheless hoping that gdb's testresults on powerpc will improve because of this patch. I've actually had this patch in my local tree for about 4 months, but it's only recently that the automated tester has managed to upgrade its binutils; there is an essential binutils patch that's required for GCC's libraries to build on the EABI targets (to support -mrelocatable). -- - Geoffrey Keating ===File ~/patches/cygnus/rs6000-dwarf2debug.patch=========== 2001-08-12 Geoffrey Keating * config/rs6000/sysv4.h (PREFERRED_DEBUGGING_TYPE): Use DWARF2 instead of stabs by default. Index: config/rs6000/sysv4.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.h,v retrieving revision 1.57 diff -p -u -p -r1.57 sysv4.h --- sysv4.h 2001/08/12 21:17:43 1.57 +++ sysv4.h 2001/08/13 06:21:34 @@ -868,11 +868,11 @@ do { \ /* This is the end of what might become sysv4.h. */ -/* Allow stabs and dwarf, for now, make stabs the default debugging type, - not dwarf since G++ doesn't support dwarf. */ +/* Use DWARF 2 debugging information by default. */ #undef PREFERRED_DEBUGGING_TYPE -#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG +#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG +/* Historically we have also supported stabs debugging. */ #define DBX_DEBUGGING_INFO /* If we are referencing a function that is static or is known to be ============================================================