Commit 847d0c08 by Richard Henderson Committed by Richard Henderson

re PR debug/19521 (omitted stab for gcov initialization function)

        PR debug/19521
        * dbxout.c (dbxout_function_end): Take decl parameter; update callers.
        Do nothing if debug info suppressed for this function.
        (dbxout_begin_function): Early exit if debug info suppressed for
        this function.

Co-Authored-By: Stuart Hastings <stuart@apple.com>

From-SVN: r95112
parent 019dac32
2005-02-16 Richard Henderson <rth@redhat.com>
Stuart Hastings <stuart@apple.com>
PR debug/19521
* dbxout.c (dbxout_function_end): Take decl parameter; update callers.
Do nothing if debug info suppressed for this function.
(dbxout_begin_function): Early exit if debug info suppressed for
this function.
2005-02-16 Kazu Hirata <kazu@cs.umass.edu> 2005-02-16 Kazu Hirata <kazu@cs.umass.edu>
PR target/20007 PR target/20007
......
...@@ -343,7 +343,7 @@ static void dbxout_handle_pch (unsigned); ...@@ -343,7 +343,7 @@ static void dbxout_handle_pch (unsigned);
static void dbxout_source_line (unsigned int, const char *); static void dbxout_source_line (unsigned int, const char *);
static void dbxout_begin_prologue (unsigned int, const char *); static void dbxout_begin_prologue (unsigned int, const char *);
static void dbxout_source_file (const char *); static void dbxout_source_file (const char *);
static void dbxout_function_end (void); static void dbxout_function_end (tree);
static void dbxout_begin_function (tree); static void dbxout_begin_function (tree);
static void dbxout_begin_block (unsigned, unsigned); static void dbxout_begin_block (unsigned, unsigned);
static void dbxout_end_block (unsigned, unsigned); static void dbxout_end_block (unsigned, unsigned);
...@@ -903,10 +903,19 @@ dbxout_finish_complex_stabs (tree sym, STAB_CODE_TYPE code, ...@@ -903,10 +903,19 @@ dbxout_finish_complex_stabs (tree sym, STAB_CODE_TYPE code,
#if defined (DBX_DEBUGGING_INFO) #if defined (DBX_DEBUGGING_INFO)
static void static void
dbxout_function_end (void) dbxout_function_end (tree decl)
{ {
char lscope_label_name[100]; char lscope_label_name[100];
/* The N_FUN tag at the end of the function is a GNU extension,
which may be undesirable, and is unnecessary if we do not have
named sections. */
if (!use_gnu_debug_info_extensions
|| NO_DBX_FUNCTION_END
|| !targetm.have_named_sections
|| DECL_IGNORED_P (decl))
return;
/* The Lscope label must be emitted even if we aren't doing anything /* The Lscope label must be emitted even if we aren't doing anything
else; dbxout_block needs it. */ else; dbxout_block needs it. */
function_section (current_function_decl); function_section (current_function_decl);
...@@ -918,14 +927,6 @@ dbxout_function_end (void) ...@@ -918,14 +927,6 @@ dbxout_function_end (void)
targetm.asm_out.internal_label (asm_out_file, "Lscope", scope_labelno); targetm.asm_out.internal_label (asm_out_file, "Lscope", scope_labelno);
scope_labelno++; scope_labelno++;
/* The N_FUN tag at the end of the function is a GNU extension,
which may be undesirable, and is unnecessary if we do not have
named sections. */
if (!use_gnu_debug_info_extensions
|| NO_DBX_FUNCTION_END
|| !targetm.have_named_sections)
return;
/* By convention, GCC will mark the end of a function with an N_FUN /* By convention, GCC will mark the end of a function with an N_FUN
symbol and an empty string. */ symbol and an empty string. */
#ifdef DBX_OUTPUT_NFUN #ifdef DBX_OUTPUT_NFUN
...@@ -1296,7 +1297,7 @@ dbxout_function_decl (tree decl) ...@@ -1296,7 +1297,7 @@ dbxout_function_decl (tree decl)
dbxout_begin_function (decl); dbxout_begin_function (decl);
#endif #endif
dbxout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl)); dbxout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl));
dbxout_function_end (); dbxout_function_end (decl);
} }
#endif /* DBX_DEBUGGING_INFO */ #endif /* DBX_DEBUGGING_INFO */
...@@ -3358,7 +3359,12 @@ dbxout_block (tree block, int depth, tree args) ...@@ -3358,7 +3359,12 @@ dbxout_block (tree block, int depth, tree args)
static void static void
dbxout_begin_function (tree decl) dbxout_begin_function (tree decl)
{ {
int saved_tree_used1 = TREE_USED (decl); int saved_tree_used1;
if (DECL_IGNORED_P (decl))
return;
saved_tree_used1 = TREE_USED (decl);
TREE_USED (decl) = 1; TREE_USED (decl) = 1;
if (DECL_NAME (DECL_RESULT (decl)) != 0) if (DECL_NAME (DECL_RESULT (decl)) != 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment