From patchwork Mon Nov 9 16:47:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tbsaunde+gcc@tbsaunde.org X-Patchwork-Id: 541842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D5619141420 for ; Tue, 10 Nov 2015 03:47:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=eFt+2rm2; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=n4wUeu0vBOF+SYZt39Hz31ZFB7Y68kp0OGxBcK5UFdEdjEfpuEK0p vyrQxGJNDfJp/1awSc0vpMOMDWeh4V9nQRIBDhv2bz4p5oX7b7mU7TOge+6ngrQU AfKtea3L0RJe2oNz3gnSGMcD1t/orx8+tX7b632wO4oUYeguzZ3XX8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references; s=default; bh=X8VnJiLzjZQZxjVuEtUAJZo1iq0=; b=eFt+2rm2uWPrZudog1zJBCNB8PZv GeG6GERYEKR8hKd+IgKN/j8aKeV0XskCVdBENQMi5BJDAjONv9I03cr0oCetX6NX h0BFmK9OlMdW3lqfwJuHNth4R8Ibaq3T1UM3ZkBI1JunqxbA/7+KoMF2EhIH64Lg tAoH5C/mS8cWsVk= Received: (qmail 15913 invoked by alias); 9 Nov 2015 16:46:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 15851 invoked by uid 89); 9 Nov 2015 16:46:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Nov 2015 16:45:48 +0000 Received: from keg.corp.tor1.mozilla.com (unknown [66.207.193.21]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 29938C06D for ; Mon, 9 Nov 2015 16:45:47 +0000 (UTC) From: tbsaunde+gcc@tbsaunde.org To: gcc-patches@gcc.gnu.org Subject: [PATCH 04/12] always define XCOFF_DEBUGGING_INFO Date: Mon, 9 Nov 2015 11:47:41 -0500 Message-Id: <1447087669-14039-5-git-send-email-tbsaunde+gcc@tbsaunde.org> In-Reply-To: <1447087669-14039-1-git-send-email-tbsaunde+gcc@tbsaunde.org> References: <1447087669-14039-1-git-send-email-tbsaunde+gcc@tbsaunde.org> X-IsSubscribed: yes From: Trevor Saunders gcc/ChangeLog: 2015-11-09 Trevor Saunders * 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(-) diff --git a/gcc/collect2.c b/gcc/collect2.c index 20c2533..e03c978 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -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)) { diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 13d0193..6ed82cb 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) || 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 */ diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 5f4ea77..d9bd59f 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -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. */ diff --git a/gcc/dbxout.h b/gcc/dbxout.h index 098213f..954e138 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 || defined XCOFF_DEBUGGING_INFO +#if defined 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 ddda89a..b518863 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -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 diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index a174e21..0399248 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -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 diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 9c13e9b..84e8383 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -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 diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index ac89ce0..d16827b 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -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. */ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c42da7e..072e485 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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 diff --git a/gcc/final.c b/gcc/final.c index 2f57b1b..a4b66c2 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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 diff --git a/gcc/function.c b/gcc/function.c index afc2c87..e598af8 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 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 diff --git a/gcc/toplev.c b/gcc/toplev.c index b18d93e..420ae3d 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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 diff --git a/gcc/varasm.c b/gcc/varasm.c index ec6aabf..75cef25 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -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 diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c index 0e9c65f..5d19f0c 100644 --- a/gcc/xcoffout.c +++ b/gcc/xcoffout.c @@ -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"