This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.4 PATCH: Switch IRIX 6 O32 to DWARF 2

As I had mentioned before, this patch switches the preferred/default
debugging format for the mips-sgi-irix6o32 configurations to DWARF 2.  I
noticed many times that gdb support for stabs debugging seems to bitrot a
lot, even on platforms like Solaris 2 where it is the default.  Support for
stabs-in-mdebug is even worse.

While those configurations inherit the default from iris5gas.h, it used to
be overridden when the toplevel configure passed --with-stabs; this caused
config/dbx.h to be included which redefines PREFERRED_DEBUGGING_TYPE.

This patch removes this override, so the previous iris5gas.h default
becomes effective (even without --without-stabs).

At the same time, the mips.h version of MDEBUG_ASM_SPEC must be replaced so
-mdebug is only passed to gas for -gcoff* and -gstabs*.

In order that the --with-stabs case still works, we need another file (to
be included after dbx.h) which restores the mips.h default again.  This
mess is necessary since the specs involved here cannot currently be
initialized at runtime, which would be necessary to test for the value of

With the patch below, testsuite results for the stabs and dwarf2 cases are
practically identical:



The few regressions for the DWARF 2 case in those results are due to the
fact that I originally forgot to handle -gcoff* like -gstabs* in
MDEBUG_ASM_SPEC.  The patch below fixes this as well, a new bootstrap with
this version is in progress.

Ok for mainline if it passes?


Rainer Orth, Faculty of Technology, Bielefeld University

Wed Jun  4 22:07:39 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* Don't pass --with-stabs for mips*-sgi-irix6*o32.
	* configure. Regenerate.
	* config/mips/iris5gas.h (MDEBUG_ASM_SPEC): Override to match
	DWARF 2 default.

	* config/mips/dbxmdebug.h: New file.
	* config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it with
	gas and --with-stabs.

RCS file: /cvs/gcc/gcc/,v
retrieving revision 1.236
diff -u -p -r1.236
---	22 May 2003 02:49:07 -0000	1.236
+++	5 Jun 2003 21:38:53 -0000
@@ -1230,10 +1230,6 @@ fi
 # Default to using --with-stabs for certain targets.
 if test x${with_stabs} = x ; then
   case "${target}" in
-  mips*-*-irix6*o32)
-    with_stabs=yes;
-    extra_host_args="${extra_host_args} --with-stabs"
-    ;;
   mips*-*-* | alpha*-*-osf*)
Index: gcc/config.gcc
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.307
diff -u -p -r1.307 config.gcc
--- gcc/config.gcc	2 Jun 2003 15:40:43 -0000	1.307
+++ gcc/config.gcc	5 Jun 2003 21:38:53 -0000
@@ -1363,7 +1363,7 @@ mips-sgi-irix6*o32)		# SGI System V.4., 
 		tm_file="mips/iris5.h mips/iris5gas.h mips/iris6-o32-gas.h"
 		if test x$stabs = xyes
-			tm_file="${tm_file} dbx.h"
+			tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
@@ -1408,7 +1408,7 @@ mips-sgi-irix5*)		# SGI System V.4., IRI
 		tm_file="mips/iris5.h mips/iris5gas.h"
 		if test x$stabs = xyes
-			tm_file="${tm_file} dbx.h"
+			tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
Index: gcc/config/mips/dbxmdebug.h
RCS file: gcc/config/mips/dbxmdebug.h
diff -N gcc/config/mips/dbxmdebug.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gcc/config/mips/dbxmdebug.h	5 Jun 2003 21:38:53 -0000
@@ -0,0 +1,6 @@
+/* Definitions of target machine for GNU compiler, for MIPS running IRIX 5
+   or IRIX 6 (O32 ABI) using the GNU assembler with stabs-in-mdebug.  */
+/* Override iris5gas.h version again to retain mips.h default.  */
+#define MDEBUG_ASM_SPEC "%{!gdwarf*:-mdebug} %{gdwarf*:-no-mdebug}"
Index: gcc/config/mips/iris5gas.h
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris5gas.h,v
retrieving revision 1.11
diff -u -p -r1.11 iris5gas.h
--- gcc/config/mips/iris5gas.h	16 May 2003 18:57:42 -0000	1.11
+++ gcc/config/mips/iris5gas.h	5 Jun 2003 21:38:53 -0000
@@ -11,6 +11,10 @@
+/* Override mips.h version to match DWARF 2 default.  */
+#define MDEBUG_ASM_SPEC "%{gstabs*|gcoff*:-mdebug} %{!gstabs*:-no-mdebug}"
 /* Override iris5.h version to invoke [cd]tors and register eh frame
    information.  */
 #undef LINK_SPEC

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]