* [PATCH] fix PR bootstrap/48471
@ 2011-04-06 1:07 Nathan Froyd
2011-04-06 7:45 ` Tristan Gingold
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Froyd @ 2011-04-06 1:07 UTC (permalink / raw)
To: gcc-patches
My changes that moved bits of final.c to dbxout.c caused compilation
failures on targets that *didn't* enable DBX_DEBUGGING_INFO, since some
now-static symbols could be unused. To fix this, the patch below moves
all the new static variables and two macros that use some of said
variables below an #ifdef DBX_DEBUGGING_INFO. Steve Ellcey verified
that the patch fixes the problems on ia64-hp-hpux11.23 (thanks Steve!)
and I verified that the changes still bootstrap on
x86_64-unknown-linux-gnu.
Committed as obvious. Sorry about all the build breakage today, not one
of my better cleanup days...
-Nathan
PR bootstrap/48471
* dbxout.c (debug_nesting, symbol_queue, symbol_queue_index):
Move these...
(symbol_queue_size, DBXOUT_DECR_NESTING): ...and these...
(DBXOUT_DECR_NESTING_AND_RETURN): ...and this under
#ifdef DBX_DEBUGGING_INFO.
Index: dbxout.c
===================================================================
--- dbxout.c (revision 172015)
+++ dbxout.c (working copy)
@@ -96,27 +96,6 @@ along with GCC; see the file COPYING3.
#include "xcoffout.h"
#endif
-/* When -gused is used, emit debug info for only used symbols. But in
- addition to the standard intercepted debug_hooks there are some
- direct calls into this file, i.e., dbxout_symbol, dbxout_parms, and
- dbxout_reg_params. Those routines may also be called from a higher
- level intercepted routine. So to prevent recording data for an inner
- call to one of these for an intercept, we maintain an intercept
- nesting counter (debug_nesting). We only save the intercepted
- arguments if the nesting is 1. */
-static int debug_nesting = 0;
-
-static tree *symbol_queue;
-static int symbol_queue_index = 0;
-static int symbol_queue_size = 0;
-
-#define DBXOUT_DECR_NESTING \
- if (--debug_nesting == 0 && symbol_queue_index > 0) \
- { emit_pending_bincls_if_required (); debug_flush_symbol_queue (); }
-
-#define DBXOUT_DECR_NESTING_AND_RETURN(x) \
- do {--debug_nesting; return (x);} while (0)
-
#ifndef ASM_STABS_OP
# ifdef XCOFF_DEBUGGING_INFO
# define ASM_STABS_OP "\t.stabx\t"
@@ -926,6 +905,27 @@ dbxout_finish_complex_stabs (tree sym, s
#if defined (DBX_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
+ direct calls into this file, i.e., dbxout_symbol, dbxout_parms, and
+ dbxout_reg_params. Those routines may also be called from a higher
+ level intercepted routine. So to prevent recording data for an inner
+ call to one of these for an intercept, we maintain an intercept
+ nesting counter (debug_nesting). We only save the intercepted
+ arguments if the nesting is 1. */
+static int debug_nesting = 0;
+
+static tree *symbol_queue;
+static int symbol_queue_index = 0;
+static int symbol_queue_size = 0;
+
+#define DBXOUT_DECR_NESTING \
+ if (--debug_nesting == 0 && symbol_queue_index > 0) \
+ { emit_pending_bincls_if_required (); debug_flush_symbol_queue (); }
+
+#define DBXOUT_DECR_NESTING_AND_RETURN(x) \
+ do {--debug_nesting; return (x);} while (0)
+
static void
dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix PR bootstrap/48471
2011-04-06 1:07 [PATCH] fix PR bootstrap/48471 Nathan Froyd
@ 2011-04-06 7:45 ` Tristan Gingold
2011-04-06 9:19 ` Richard Guenther
0 siblings, 1 reply; 3+ messages in thread
From: Tristan Gingold @ 2011-04-06 7:45 UTC (permalink / raw)
To: gcc-patches@gcc.gnu.org Patches; +Cc: Nathan Froyd
On Apr 6, 2011, at 3:06 AM, Nathan Froyd wrote:
> My changes that moved bits of final.c to dbxout.c caused compilation
> failures on targets that *didn't* enable DBX_DEBUGGING_INFO, since some
> now-static symbols could be unused. To fix this, the patch below moves
> all the new static variables and two macros that use some of said
> variables below an #ifdef DBX_DEBUGGING_INFO. Steve Ellcey verified
> that the patch fixes the problems on ia64-hp-hpux11.23 (thanks Steve!)
> and I verified that the changes still bootstrap on
> x86_64-unknown-linux-gnu.
>
> Committed as obvious. Sorry about all the build breakage today, not one
> of my better cleanup days...
Nathan,
bootstrap still fails for xcoff targets (eg aix). I can fix the failure with this patch.
Ok for trunk ?
Tristan.
2011-04-06 Tristan Gingold <gingold@adacore.com>
* dbxout.c: (debug_nesting, symbol_queue, symbol_queue_index)
(symbol_queue_size, DBXOUT_DECR_NESTING)
(DBXOUT_DECR_NESTING_AND_RETURN): Also define
if XCOFF_DEBUGGING_INFO.
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -903,7 +903,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
obstack_free (&stabstr_ob, str);
}
-#if defined (DBX_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || defined (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
@@ -926,6 +926,10 @@ static int symbol_queue_size = 0;
#define DBXOUT_DECR_NESTING_AND_RETURN(x) \
do {--debug_nesting; return (x);} while (0)
+#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
+
+#if defined (DBX_DEBUGGING_INFO)
+
static void
dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix PR bootstrap/48471
2011-04-06 7:45 ` Tristan Gingold
@ 2011-04-06 9:19 ` Richard Guenther
0 siblings, 0 replies; 3+ messages in thread
From: Richard Guenther @ 2011-04-06 9:19 UTC (permalink / raw)
To: Tristan Gingold; +Cc: gcc-patches@gcc.gnu.org Patches, Nathan Froyd
On Wed, Apr 6, 2011 at 9:44 AM, Tristan Gingold <gingold@adacore.com> wrote:
>
> On Apr 6, 2011, at 3:06 AM, Nathan Froyd wrote:
>
>> My changes that moved bits of final.c to dbxout.c caused compilation
>> failures on targets that *didn't* enable DBX_DEBUGGING_INFO, since some
>> now-static symbols could be unused. To fix this, the patch below moves
>> all the new static variables and two macros that use some of said
>> variables below an #ifdef DBX_DEBUGGING_INFO. Steve Ellcey verified
>> that the patch fixes the problems on ia64-hp-hpux11.23 (thanks Steve!)
>> and I verified that the changes still bootstrap on
>> x86_64-unknown-linux-gnu.
>>
>> Committed as obvious. Sorry about all the build breakage today, not one
>> of my better cleanup days...
>
> Nathan,
>
> bootstrap still fails for xcoff targets (eg aix). I can fix the failure with this patch.
>
> Ok for trunk ?
Ok.
Thanks,
Richard.
> Tristan.
>
> 2011-04-06 Tristan Gingold <gingold@adacore.com>
>
> * dbxout.c: (debug_nesting, symbol_queue, symbol_queue_index)
> (symbol_queue_size, DBXOUT_DECR_NESTING)
> (DBXOUT_DECR_NESTING_AND_RETURN): Also define
> if XCOFF_DEBUGGING_INFO.
>
> --- a/gcc/dbxout.c
> +++ b/gcc/dbxout.c
> @@ -903,7 +903,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
> obstack_free (&stabstr_ob, str);
> }
>
> -#if defined (DBX_DEBUGGING_INFO)
> +#if defined (DBX_DEBUGGING_INFO) || defined (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
> @@ -926,6 +926,10 @@ static int symbol_queue_size = 0;
> #define DBXOUT_DECR_NESTING_AND_RETURN(x) \
> do {--debug_nesting; return (x);} while (0)
>
> +#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
> +
> +#if defined (DBX_DEBUGGING_INFO)
> +
> static void
> dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
> {
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-06 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06 1:07 [PATCH] fix PR bootstrap/48471 Nathan Froyd
2011-04-06 7:45 ` Tristan Gingold
2011-04-06 9:19 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).