This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[PATCH] Switch Linux to DWARF-2


Hi!

My understanding was that there was a consensus about going to DWARF-2
for 3.1. Is that right?
The following patch switches it for Linux targets which don't yet use
DWARF-2 by default.
I'm using this for a couple of weeks already in our rpms.
Ok to commit?

What about elfos.h PREFERRED_DEBUGGING_TYPE?

2001-12-15  Jakub Jelinek  <jakub@redhat.com>

	* config/linux.h (PREFERRED_DEBUGGING_TYPE): Prefer DWARF2.
	* config/sparc/linux.h (PREFERRED_DEBUGGING_TYPE): Likewise.
	Remove duplicate definition.
	* config/sparc/linux64.h (CC1_SPEC): Don't default to -gstabs+
	if -m32.

--- gcc/config/linux.h.jj	Mon Oct 22 11:07:06 2001
+++ gcc/config/linux.h	Sat Dec 15 11:49:24 2001
@@ -37,9 +37,9 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_APP_OFF
 #define ASM_APP_OFF "#NO_APP\n"
 
-/* Use stabs instead of DWARF debug format.  */
+/* Use DWARF 2 instead of stabs debug format.  */
 #undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 #undef MD_EXEC_PREFIX
 #undef MD_STARTFILE_PREFIX
--- gcc/config/sparc/linux.h.jj	Mon Dec 10 19:13:52 2001
+++ gcc/config/sparc/linux.h	Sat Dec 15 11:53:22 2001
@@ -32,8 +32,9 @@ Boston, MA 02111-1307, USA.  */
 #define MULTIBYTE_CHARS 1
 #endif
 
-/* Use stabs instead of DWARF debug format.  */
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+/* Use DWARF 2 instead of stabs debug format.  */
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 #undef MD_EXEC_PREFIX
 #undef MD_STARTFILE_PREFIX
@@ -187,11 +188,6 @@ Boston, MA 02111-1307, USA.  */
 #undef DBX_REGISTER_NUMBER
 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
 
-/* We use stabs-in-elf for debugging, because that is what the native
-   toolchain uses.  XXX */
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
 #undef ASM_OUTPUT_ALIGNED_LOCAL
 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)		\
 do {									\
--- gcc/config/sparc/linux64.h.jj	Mon Dec 10 19:13:52 2001
+++ gcc/config/sparc/linux64.h	Sat Dec 15 11:55:47 2001
@@ -247,7 +247,6 @@ Boston, MA 02111-1307, USA.  */
 %{m64:-mptr64 -mstack-bias -mlong-double-128 \
   %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=ultrasparc}}}}}}} \
   %{!mno-vis:%{!mcpu=v9:-mvis}}} \
-%{!m64:%{g*:%{!gs*:%{!gd*:%{!gx*:%{!gc*:-gstabs+}}}}}} \
 "
 #else
 #define CC1_SPEC "\
@@ -256,8 +255,7 @@ Boston, MA 02111-1307, USA.  */
 %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
 %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
 %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \
-  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=cypress}}}}}}} \
-  %{g*:%{!gs*:%{!gd*:%{!gx*:%{!gc*:-gstabs+}}}}}} \
+  %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=cypress}}}}}}}} \
 %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \
 %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}} \
 "

	Jakub


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