[PATCH] Switch ELF to DWARF-2
Jakub Jelinek
jakub@redhat.com
Mon Dec 17 14:34:00 GMT 2001
On Sat, Dec 15, 2001 at 05:56:59PM -0800, Richard Henderson wrote:
> On Sat, Dec 15, 2001 at 10:49:33AM +0100, Jakub Jelinek wrote:
> > 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?
>
> I'd prefer to switch all ELF targets to dwarf2, like David O'Brian
> wanted to do last week. Linux would then not override
> PREFERRED_DEBUGGING_TYPE.
Ok to commit this then?
2001-12-17 Jakub Jelinek <jakub@redhat.com>
* config/linux.h (PREFERRED_DEBUGGING_TYPE): Remove.
* config/sparc/linux.h (PREFERRED_DEBUGGING_TYPE): Remove.
* config/sparc/linux64.h (PREFERRED_DEBUGGING_TYPE): Remove.
(CC1_SPEC): Don't default to -gstabs+ if -m32.
2001-12-05 David O'Brien <obrien@FreeBSD.org>
* elfos.h (PREFERRED_DEBUGGING_TYPE): Change to DWARF2_DEBUG.
--- gcc/config/sparc/linux.h.jj Sat Dec 15 14:00:20 2001
+++ gcc/config/sparc/linux.h Tue Dec 18 00:42:17 2001
@@ -32,9 +32,6 @@ Boston, MA 02111-1307, USA. */
#define MULTIBYTE_CHARS 1
#endif
-/* Use stabs instead of DWARF debug format. */
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
@@ -194,11 +191,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 Sat Dec 15 14:00:20 2001
+++ gcc/config/sparc/linux64.h Tue Dec 18 00:43:26 2001
@@ -249,7 +249,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 "\
@@ -258,8 +257,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}}} \
"
@@ -315,9 +313,6 @@ Boston, MA 02111-1307, USA. */
#define DWARF2_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
#undef ASM_OUTPUT_ALIGNED_LOCAL
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
do { \
--- gcc/config/elfos.h.jj Fri Dec 14 13:05:32 2001
+++ gcc/config/elfos.h Tue Dec 18 00:40:49 2001
@@ -70,11 +70,12 @@ Boston, MA 02111-1307, USA. */
#define DWARF2_DEBUGGING_INFO 1
#endif
-/* The GNU tools operate better with stabs. Since we don't have
- any native tools to be compatible with, default to stabs. */
+/* The GNU tools operate better with dwarf2, and it is required by some
+ psABI's. Since we don't have any native tools to be compatible with,
+ default to dwarf2. */
#ifndef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#endif
/* All SVR4 targets use the ELF object file format. */
--- gcc/config/linux.h.jj Sat Dec 15 14:00:20 2001
+++ gcc/config/linux.h Tue Dec 18 00:41:48 2001
@@ -37,10 +37,6 @@ Boston, MA 02111-1307, USA. */
#undef ASM_APP_OFF
#define ASM_APP_OFF "#NO_APP\n"
-/* Use stabs instead of DWARF debug format. */
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
Jakub
More information about the Gcc-patches
mailing list