From 5394314855439d86e5bb52ef07713472e2fee0dc Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Sun, 15 Nov 2015 00:17:51 +0000 Subject: [PATCH] remove conditional compilation of sdb debug info gcc/ChangeLog: 2015-11-14 Trevor Saunders * defaults.h: New definition of SDB_DEBUGGING_INFO. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Adjust. * final.c (rest_of_clean_state): Remove check if SDB_DEBUGGING_INFO is defined. * function.c (number_blocks): Likewise. * output.h: Likewise. * sdbout.c: Likewise. * toplev.c (process_options): Likewise. From-SVN: r230390 --- gcc/ChangeLog | 12 ++++++++++++ gcc/defaults.h | 8 ++++++-- gcc/doc/tm.texi | 2 +- gcc/doc/tm.texi.in | 2 +- gcc/final.c | 6 +----- gcc/function.c | 2 +- gcc/output.h | 2 -- gcc/sdbout.c | 6 +----- gcc/toplev.c | 6 +----- 9 files changed, 24 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 62cbbcd491a..3ac6d3f6382 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2015-11-14 Trevor Saunders + + * defaults.h: New definition of SDB_DEBUGGING_INFO. + * doc/tm.texi: Regenerate. + * doc/tm.texi.in: Adjust. + * final.c (rest_of_clean_state): Remove check if + SDB_DEBUGGING_INFO is defined. + * function.c (number_blocks): Likewise. + * output.h: Likewise. + * sdbout.c: Likewise. + * toplev.c (process_options): Likewise. + 2015-11-14 Trevor Saunders * gsyms.h (enum sdb_type): Remove code for diff --git a/gcc/defaults.h b/gcc/defaults.h index cee799d8590..ddda89a7e14 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -914,10 +914,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define DEFAULT_GDB_EXTENSIONS 1 #endif +#ifndef SDB_DEBUGGING_INFO +#define SDB_DEBUGGING_INFO 0 +#endif + /* If more than one debugging type is supported, you must define PREFERRED_DEBUGGING_TYPE to choose the default. */ -#if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \ +#if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \ + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \ + defined (VMS_DEBUGGING_INFO)) #ifndef PREFERRED_DEBUGGING_TYPE @@ -929,7 +933,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #elif defined DBX_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG -#elif defined SDB_DEBUGGING_INFO +#elif SDB_DEBUGGING_INFO #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG #elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 4272c369dda..1a7760a4900 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -9572,7 +9572,7 @@ whose value is the highest absolute text address in the file. Here are macros for SDB and DWARF output. @defmac SDB_DEBUGGING_INFO -Define this macro if GCC should produce COFF-style debugging output +Define this macro to 1 if GCC should produce COFF-style debugging output for SDB in response to the @option{-g} option. @end defmac diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 9fcc0f76914..34105c929c5 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -6997,7 +6997,7 @@ whose value is the highest absolute text address in the file. Here are macros for SDB and DWARF output. @defmac SDB_DEBUGGING_INFO -Define this macro if GCC should produce COFF-style debugging output +Define this macro to 1 if GCC should produce COFF-style debugging output for SDB in response to the @option{-g} option. @end defmac diff --git a/gcc/final.c b/gcc/final.c index 30b38267e46..2f57b1bc3f1 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -88,9 +88,7 @@ along with GCC; see the file COPYING3. If not see #include "dbxout.h" #endif -#ifdef SDB_DEBUGGING_INFO #include "sdbout.h" -#endif /* Most ports that aren't using cc0 don't need to define CC_STATUS_INIT. So define a null default for it to save conditionalization later. */ @@ -4644,10 +4642,8 @@ rest_of_clean_state (void) /* In case the function was not output, don't leave any temporary anonymous types queued up for sdb output. */ -#ifdef SDB_DEBUGGING_INFO - if (write_symbols == SDB_DEBUG) + if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG) sdbout_types (NULL_TREE); -#endif flag_rerun_cse_after_global_opts = 0; reload_completed = 0; diff --git a/gcc/function.c b/gcc/function.c index a637cb39142..afc2c87dbcc 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4671,7 +4671,7 @@ number_blocks (tree fn) /* For SDB and XCOFF debugging output, we start numbering the blocks from 1 within each function, rather than keeping a running count. */ -#if defined (SDB_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) +#if SDB_DEBUGGING_INFO || defined (XCOFF_DEBUGGING_INFO) if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG) next_block_index = 1; #endif diff --git a/gcc/output.h b/gcc/output.h index f6a576c22b8..d485cd6155e 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -309,9 +309,7 @@ extern rtx_sequence *final_sequence; /* The line number of the beginning of the current function. Various md code needs this so that it can output relative linenumbers. */ -#ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers. */ extern int sdb_begin_function_line; -#endif /* File in which assembler code is being written. */ diff --git a/gcc/sdbout.c b/gcc/sdbout.c index e495a8aa0bc..f22bc7cd087 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -42,6 +42,7 @@ AT&T C compiler. From the example below I would conclude the following: #include "config.h" #include "system.h" #include "coretypes.h" +#include "gsyms.h" #include "tm.h" #include "debug.h" #include "tree.h" @@ -65,8 +66,6 @@ static GTY(()) vec *deferred_global_decls; static GTY(()) tree preinit_symbols; static GTY(()) bool sdbout_initialized; -#ifdef SDB_DEBUGGING_INFO - #include "rtl.h" #include "regs.h" #include "flags.h" @@ -75,7 +74,6 @@ static GTY(()) bool sdbout_initialized; #include "output.h" #include "diagnostic-core.h" #include "tm_p.h" -#include "gsyms.h" #include "langhooks.h" #include "target.h" @@ -1648,6 +1646,4 @@ sdbout_init (const char *input_file_name ATTRIBUTE_UNUSED) preinit_symbols = 0; } -#endif /* SDB_DEBUGGING_INFO */ - #include "gt-sdbout.h" diff --git a/gcc/toplev.c b/gcc/toplev.c index 588d89dce89..5aade2fb739 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -80,9 +80,7 @@ along with GCC; see the file COPYING3. If not see #include "dbxout.h" #endif -#ifdef SDB_DEBUGGING_INFO #include "sdbout.h" -#endif #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" /* Needed for external data declarations. */ @@ -1379,10 +1377,8 @@ process_options (void) else if (write_symbols == XCOFF_DEBUG) debug_hooks = &xcoff_debug_hooks; #endif -#ifdef SDB_DEBUGGING_INFO - else if (write_symbols == SDB_DEBUG) + else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG) debug_hooks = &sdb_debug_hooks; -#endif #ifdef DWARF2_DEBUGGING_INFO else if (write_symbols == DWARF2_DEBUG) debug_hooks = &dwarf2_debug_hooks; -- 2.30.2