DWARF2_DEBUGGING_INFO on Darwin

Adriaan van Os gcc@microbizz.nl
Sat Apr 12 11:28:00 GMT 2003


Compiling any .c source on Darwin with gcc 3.2.2 using the -ggdb or 
-gdwarf-2 switch, produces an internal compiler error in 
default_no_named_section, at varasm.c:5305.

The reason being that the Darwin back-end claims to support dwarf-2 
(config/darwin.h:128), but doesn't set TARGET_ASM_NAMED_SECTION.

As Darwin doesn't really support dwarf-2 debug info, I propose the 
following patch:

--- gcc/config/darwin.h.orig	Tue Jan 15 20:20:20 2002
+++ gcc/config/ darwin.h	Sat Apr 12 11:45:49 2003
@@ -122,11 +122,11 @@
  /* We use Dbx symbol format.  */

  #define DBX_DEBUGGING_INFO

-/* Also enable Dwarf 2 as an option.  */
+/* Darwin doesn't really support Dwarf 2.  */

-#define DWARF2_DEBUGGING_INFO
+#undef DWARF2_DEBUGGING_INFO

  #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG

  /* When generating stabs debugging, use N_BINCL entries.  */

Regards,

Adriaan van Os



More information about the Gcc-patches mailing list