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 07/12] always define DBX_DEBUGGING_INFO


From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/arc/arc.h: Define DBX_DEBUGGING_INFO to 1.
	* config/pdp11/pdp11.h: Likewise.
	* defaults.h (DBX_DEBUGGING_INFO): New default definition.
	* config/rs6000/rs6000.c (macho_branch_islands): Adjust.
	* dbxout.c (struct dbx_file): Likewise.
	(debug_flush_symbol_queue): Likewise.
	(default_stabs_asm_out_destructor): Likewise.
	(default_stabs_asm_out_constructor): Likewise.
					* dbxout.h: Likewise.
		* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* final.c: Likewise.
	* gcc.c: Likewise.
	* opts.c (set_debug_level): Likewise.
	* toplev.c (process_options): Likewise.
---
 gcc/config/arc/arc.h       |  2 +-
 gcc/config/pdp11/pdp11.h   |  2 +-
 gcc/config/rs6000/rs6000.c |  4 ++--
 gcc/dbxout.c               | 20 ++++++++++----------
 gcc/dbxout.h               |  2 +-
 gcc/defaults.h             |  8 ++++++--
 gcc/doc/tm.texi            |  4 ++--
 gcc/doc/tm.texi.in         |  4 ++--
 gcc/final.c                |  2 +-
 gcc/gcc.c                  |  4 ++--
 gcc/opts.c                 |  2 +-
 gcc/toplev.c               |  6 ++----
 12 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index cb98bda..b40b04f 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -1441,7 +1441,7 @@ extern int arc_return_address_regs[4];
 #ifdef DBX_DEBUGGING_INFO
 #undef DBX_DEBUGGING_INFO
 #endif
-#define DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO 1
 
 #ifdef DWARF2_DEBUGGING_INFO
 #undef DWARF2_DEBUGGING_INFO
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 8339f1c..2c82e2c 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3.  If not see
 
 /* Generate DBX debugging information.  */
 
-#define DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO 1
 
 #define TARGET_40_PLUS		(TARGET_40 || TARGET_45)
 #define TARGET_10		(! TARGET_40_PLUS)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6ed82cb..4ccee23 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -30455,7 +30455,7 @@ macho_branch_islands (void)
 	}
       strcpy (tmp_buf, "\n");
       strcat (tmp_buf, label);
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
@@ -30505,7 +30505,7 @@ macho_branch_islands (void)
 	  strcat (tmp_buf, ")\n\tmtctr r12\n\tbctr");
 	}
       output_asm_insn (tmp_buf, 0);
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index d9bd59f..993ceda 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -217,7 +217,7 @@ struct dbx_file
    should always be 0 because we should not have needed any file numbers
    yet.  */
 
-#if (defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)) \
+#if ((DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)) \
     && defined (DBX_USE_BINCL)
 static struct dbx_file *current_file;
 #endif
@@ -250,7 +250,7 @@ static GTY(()) int lastfile_is_base;
 /* Typical USG systems don't have stab.h, and they also have
    no use for DBX-format debugging info.  */
 
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 #ifdef DBX_USE_BINCL
 /* If zero then there is no pending BINCL.  */
@@ -329,7 +329,7 @@ static void dbxout_handle_pch (unsigned);
 static void debug_free_queue (void);
 
 /* The debug hooks structure.  */
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 static void dbxout_source_line (unsigned int, const char *, int, bool);
 static void dbxout_begin_prologue (unsigned int, const char *);
@@ -860,7 +860,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
   obstack_free (&stabstr_ob, str);
 }
 
-#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 /* When -gused is used, emit debug info for only used symbols. But in
    addition to the standard intercepted debug_hooks there are some
@@ -885,7 +885,7 @@ static int symbol_queue_size = 0;
 
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
 
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 static void
 dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
@@ -1207,7 +1207,7 @@ dbxout_handle_pch (unsigned at_end)
     }
 }
 
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 static void dbxout_block (tree, int, tree);
 
@@ -1411,7 +1411,7 @@ debug_flush_symbol_queue (void)
       TREE_USED (symbol_queue[i]) = 1;
       TYPE_DECL_SUPPRESS_DEBUG (symbol_queue[i]) = 0;
 
-#ifdef DBX_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO
       dbxout_symbol (symbol_queue[i], 0);
 #endif
 
@@ -3636,7 +3636,7 @@ dbxout_args (tree args)
     }
 }
 
-#if defined (DBX_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO)
 
 /* Subroutine of dbxout_block.  Emit an N_LBRAC stab referencing LABEL.
    BEGIN_LABEL is the name of the beginning of the function, which may
@@ -3788,7 +3788,7 @@ void
 default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
 				  int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
@@ -3805,7 +3805,7 @@ void
 default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
 				   int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
index 954e138..725abb8 100644
--- a/gcc/dbxout.h
+++ b/gcc/dbxout.h
@@ -29,7 +29,7 @@ extern void default_stabs_asm_out_destructor (rtx, int);
 extern void default_stabs_asm_out_constructor (rtx, int);
 
 /* dbxout helper functions */
-#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
 
 extern void dbxout_int (int);
 extern void dbxout_stabd (int, int);
diff --git a/gcc/defaults.h b/gcc/defaults.h
index dddf796..d1728aa 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -914,6 +914,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DEFAULT_GDB_EXTENSIONS 1
 #endif
 
+#ifndef DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO 0
+#endif
+
 #ifndef SDB_DEBUGGING_INFO
 #define SDB_DEBUGGING_INFO 0
 #endif
@@ -933,7 +937,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* If more than one debugging type is supported, you must define
    PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
-#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
+#if 1 < ((DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
 	 + (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
 	 + (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
@@ -942,7 +946,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 /* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
    here so other code needn't care.  */
-#elif defined DBX_DEBUGGING_INFO
+#elif DBX_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
 
 #elif SDB_DEBUGGING_INFO
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 88c89be..95e071b 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9338,7 +9338,7 @@ When the user specifies @option{-ggdb}, GCC normally also uses the
 value of this macro to select the debugging output format, but with two
 exceptions.  If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
 value @code{DWARF2_DEBUG}.  Otherwise, if @code{DBX_DEBUGGING_INFO} is
-defined, GCC uses @code{DBX_DEBUG}.
+defined to 1, GCC uses @code{DBX_DEBUG}.
 
 The value of this macro only affects the default debugging output; the
 user can always get a specific type of output by using @option{-gstabs},
@@ -9352,7 +9352,7 @@ user can always get a specific type of output by using @option{-gstabs},
 These are specific options for DBX output.
 
 @defmac DBX_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for DBX
+Define this macro to 1 if GCC should produce debugging output for DBX
 in response to the @option{-g} option.
 @end defmac
 
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 4b46a45..9a7f557 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -6763,7 +6763,7 @@ When the user specifies @option{-ggdb}, GCC normally also uses the
 value of this macro to select the debugging output format, but with two
 exceptions.  If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
 value @code{DWARF2_DEBUG}.  Otherwise, if @code{DBX_DEBUGGING_INFO} is
-defined, GCC uses @code{DBX_DEBUG}.
+defined to 1, GCC uses @code{DBX_DEBUG}.
 
 The value of this macro only affects the default debugging output; the
 user can always get a specific type of output by using @option{-gstabs},
@@ -6777,7 +6777,7 @@ user can always get a specific type of output by using @option{-gstabs},
 These are specific options for DBX output.
 
 @defmac DBX_DEBUGGING_INFO
-Define this macro if GCC should produce debugging output for DBX
+Define this macro to 1 if GCC should produce debugging output for DBX
 in response to the @option{-g} option.
 @end defmac
 
diff --git a/gcc/final.c b/gcc/final.c
index a4b66c2..9eeea3e 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -84,7 +84,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #include "dwarf2out.h"
 
-#ifdef DBX_DEBUGGING_INFO
+#if DBX_DEBUGGING_INFO
 #include "dbxout.h"
 #endif
 
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 2600b83..bdd64a6 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -828,14 +828,14 @@ proper position among the other output files.  */
 /* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g'
    to the assembler.  */
 #ifndef ASM_DEBUG_SPEC
-# if defined(DBX_DEBUGGING_INFO) && (DWARF2_DEBUGGING_INFO) \
+# if (DBX_DEBUGGING_INFO) && (DWARF2_DEBUGGING_INFO) \
      && defined(HAVE_AS_GDWARF2_DEBUG_FLAG) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
 #  define ASM_DEBUG_SPEC						\
       (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG				\
        ? "%{!g0:%{gdwarf*:--gdwarf2}%{!gdwarf*:%{g*:--gstabs}}}" ASM_MAP	\
        : "%{!g0:%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}}" ASM_MAP)
 # else
-#  if defined(DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
+#  if (DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG)
 #   define ASM_DEBUG_SPEC "%{g*:%{!g0:--gstabs}}" ASM_MAP
 #  endif
 #  if (DWARF2_DEBUGGING_INFO) && defined(HAVE_AS_GDWARF2_DEBUG_FLAG)
diff --git a/gcc/opts.c b/gcc/opts.c
index 1ae7d75..0ed9ac6 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2289,7 +2289,7 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg,
 	    {
 #if DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
 	      opts->x_write_symbols = DWARF2_DEBUG;
-#elif defined DBX_DEBUGGING_INFO
+#elif DBX_DEBUGGING_INFO
 	      opts->x_write_symbols = DBX_DEBUG;
 #endif
 	    }
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b12571b..d015f0f 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -76,7 +76,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-chkp.h"
 #include "omp-low.h"
 
-#if defined(DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
+#if (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 #include "dbxout.h"
 #endif
 
@@ -1368,10 +1368,8 @@ process_options (void)
 
   if (write_symbols == NO_DEBUG)
     ;
-#if defined(DBX_DEBUGGING_INFO)
-  else if (write_symbols == DBX_DEBUG)
+  else if (DBX_DEBUGGING_INFO && write_symbols == DBX_DEBUG)
     debug_hooks = &dbx_debug_hooks;
-#endif
   else if (XCOFF_DEBUGGING_INFO && write_symbols == XCOFF_DEBUG)
     debug_hooks = &xcoff_debug_hooks;
   else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
-- 
2.5.0.rc1.5.gc07173f


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