@@ -2799,12 +2799,10 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
if ((name = ldgetname (ldptr, &symbol)) == NULL)
continue; /* Should never happen. */
-#ifdef XCOFF_DEBUGGING_INFO
/* All AIX function names have a duplicate entry
beginning with a dot. */
- if (*name == '.')
+ if (XCOFF_DEBUGGING_INFO && *name == '.')
++name;
-#endif
switch (is_ctor_dtor (name))
{
@@ -30455,7 +30455,7 @@ macho_branch_islands (void)
}
strcpy (tmp_buf, "\n");
strcat (tmp_buf, label);
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (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) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (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 */
@@ -91,12 +91,12 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "expr.h"
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
#endif
#ifndef ASM_STABS_OP
-# ifdef XCOFF_DEBUGGING_INFO
+# if XCOFF_DEBUGGING_INFO
# define ASM_STABS_OP "\t.stabx\t"
# else
# define ASM_STABS_OP "\t.stabs\t"
@@ -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) || defined (XCOFF_DEBUGGING_INFO)) \
+#if (defined (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) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
#ifdef DBX_USE_BINCL
/* If zero then there is no pending BINCL. */
@@ -382,7 +382,7 @@ const struct gcc_debug_hooks dbx_debug_hooks =
};
#endif /* DBX_DEBUGGING_INFO */
-#if defined (XCOFF_DEBUGGING_INFO)
+#if (XCOFF_DEBUGGING_INFO)
const struct gcc_debug_hooks xcoff_debug_hooks =
{
dbxout_init,
@@ -860,7 +860,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
obstack_free (&stabstr_ob, str);
}
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (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
@@ -3788,7 +3788,7 @@ void
default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
int priority ATTRIBUTE_UNUSED)
{
-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+#if defined 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 || defined XCOFF_DEBUGGING_INFO
+#if defined 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. */
@@ -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 || defined XCOFF_DEBUGGING_INFO
+#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
extern void dbxout_int (int);
extern void dbxout_stabd (int, int);
@@ -918,11 +918,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define SDB_DEBUGGING_INFO 0
#endif
+#ifndef XCOFF_DEBUGGING_INFO
+#define XCOFF_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) + (SDB_DEBUGGING_INFO) \
- + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
+ + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
+ defined (VMS_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE
#error You must define PREFERRED_DEBUGGING_TYPE
@@ -942,7 +946,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#elif defined VMS_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
-#elif defined XCOFF_DEBUGGING_INFO
+#elif XCOFF_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
#else
@@ -9357,7 +9357,7 @@ in response to the @option{-g} option.
@end defmac
@defmac XCOFF_DEBUGGING_INFO
-Define this macro if GCC should produce XCOFF format debugging output
+Define this macro to 1 if GCC should produce XCOFF format debugging output
in response to the @option{-g} option. This is a variant of DBX format.
@end defmac
@@ -6782,7 +6782,7 @@ in response to the @option{-g} option.
@end defmac
@defmac XCOFF_DEBUGGING_INFO
-Define this macro if GCC should produce XCOFF format debugging output
+Define this macro to 1 if GCC should produce XCOFF format debugging output
in response to the @option{-g} option. This is a variant of DBX format.
@end defmac
@@ -31,10 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "dwarf2asm.h"
#include "dwarf2.h"
-#ifndef XCOFF_DEBUGGING_INFO
-#define XCOFF_DEBUGGING_INFO 0
-#endif
-
/* Output an unaligned integer with the given value and size. Prefer not
to print a newline, since the caller may want to add a comment. */
@@ -97,10 +97,6 @@ static rtx_insn *last_var_location_insn;
static rtx_insn *cached_next_real_insn;
static void dwarf2out_decl (tree);
-#ifndef XCOFF_DEBUGGING_INFO
-#define XCOFF_DEBUGGING_INFO 0
-#endif
-
#ifndef HAVE_XCOFF_DWARF_EXTRAS
#define HAVE_XCOFF_DWARF_EXTRAS 0
#endif
@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl-iter.h"
#include "print-rtl.h"
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
#include "xcoffout.h" /* Needed for external data declarations. */
#endif
@@ -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 SDB_DEBUGGING_INFO || defined (XCOFF_DEBUGGING_INFO)
+#if SDB_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG)
next_block_index = 1;
#endif
@@ -76,13 +76,13 @@ along with GCC; see the file COPYING3. If not see
#include "tree-chkp.h"
#include "omp-low.h"
-#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
+#if defined(DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
#include "dbxout.h"
#endif
#include "sdbout.h"
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
#include "xcoffout.h" /* Needed for external data declarations. */
#endif
@@ -1372,10 +1372,8 @@ process_options (void)
else if (write_symbols == DBX_DEBUG)
debug_hooks = &dbx_debug_hooks;
#endif
-#if defined(XCOFF_DEBUGGING_INFO)
- else if (write_symbols == XCOFF_DEBUG)
+ else if (XCOFF_DEBUGGING_INFO && write_symbols == XCOFF_DEBUG)
debug_hooks = &xcoff_debug_hooks;
-#endif
else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
debug_hooks = &sdb_debug_hooks;
#ifdef DWARF2_DEBUGGING_INFO
@@ -53,7 +53,7 @@ along with GCC; see the file COPYING3. If not see
#include "asan.h"
#include "rtl-iter.h"
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
#include "xcoffout.h" /* Needed for external data declarations. */
#endif
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "debug.h"
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
/* This defines the C_* storage classes. */
#include "xcoff.h"
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org> gcc/ChangeLog: 2015-11-09 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * collect2.c (scan_prog_file): Remove check if XCOFF_DEBUGGING_INFO is defined. * config/rs6000/rs6000.c (macho_branch_islands): Likewise. * dbxout.c (struct dbx_file): Likewise. (default_stabs_asm_out_destructor): Likewise. (default_stabs_asm_out_constructor): Likewise. * dbxout.h: Likewise. * defaults.h: New definition of XCOFF_DEBUGGING_INFO. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Adjust. * dwarf2asm.c: Likewise. * dwarf2out.c: Likewise. * final.c: Likewise. * function.c (number_blocks): Likewise. * toplev.c (process_options): Likewise. * varasm.c: Likewise. * xcoffout.c: Likewise. --- gcc/collect2.c | 4 +--- gcc/config/rs6000/rs6000.c | 4 ++-- gcc/dbxout.c | 16 ++++++++-------- gcc/dbxout.h | 2 +- gcc/defaults.h | 8 ++++++-- gcc/doc/tm.texi | 2 +- gcc/doc/tm.texi.in | 2 +- gcc/dwarf2asm.c | 4 ---- gcc/dwarf2out.c | 4 ---- gcc/final.c | 2 +- gcc/function.c | 2 +- gcc/toplev.c | 8 +++----- gcc/varasm.c | 2 +- gcc/xcoffout.c | 2 +- 14 files changed, 27 insertions(+), 35 deletions(-)