Commit 403f8503 by Zack Weinberg Committed by Zack Weinberg

dbxout.c (dbxout_function_decl): Always call dbxout_function_end.

	* dbxout.c (dbxout_function_decl): Always call dbxout_function_end.
	(dbxout_function_end): Return after emitting the "Lscope" symbol
	under the same conditions that this function formerly wasn't called.
	Add explanatory comments.

From-SVN: r85546
parent ca043393
2004-08-03 Zack Weinberg <zack@codesourcery.com> 2004-08-03 Zack Weinberg <zack@codesourcery.com>
* dbxout.c (dbxout_function_decl): Always call dbxout_function_end.
(dbxout_function_end): Return after emitting the "Lscope" symbol
under the same conditions that this function formerly wasn't called.
Add explanatory comments.
PR 14680 PR 14680
* c-decl.c (record_builtin_type): Call debug_hooks->type_decl * c-decl.c (record_builtin_type): Call debug_hooks->type_decl
on the new decl. on the new decl.
......
...@@ -449,6 +449,8 @@ dbxout_function_end (void) ...@@ -449,6 +449,8 @@ dbxout_function_end (void)
{ {
char lscope_label_name[100]; char lscope_label_name[100];
/* The Lscope label must be emitted even if we aren't doing anything
else; dbxout_block needs it. */
function_section (current_function_decl); function_section (current_function_decl);
/* Convert Ltext into the appropriate format for local labels in case /* Convert Ltext into the appropriate format for local labels in case
...@@ -458,6 +460,16 @@ dbxout_function_end (void) ...@@ -458,6 +460,16 @@ dbxout_function_end (void)
targetm.asm_out.internal_label (asmfile, "Lscope", scope_labelno); targetm.asm_out.internal_label (asmfile, "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
#if defined(NO_DBX_FUNCTION_END)
|| NO_DBX_FUNCTION_END
#endif
|| !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
...@@ -792,12 +804,7 @@ dbxout_function_decl (tree decl) ...@@ -792,12 +804,7 @@ dbxout_function_decl (tree decl)
#ifdef DBX_OUTPUT_FUNCTION_END #ifdef DBX_OUTPUT_FUNCTION_END
DBX_OUTPUT_FUNCTION_END (asmfile, decl); DBX_OUTPUT_FUNCTION_END (asmfile, decl);
#endif #endif
if (use_gnu_debug_info_extensions dbxout_function_end ();
#if defined(NO_DBX_FUNCTION_END)
&& ! NO_DBX_FUNCTION_END
#endif
&& targetm.have_named_sections)
dbxout_function_end ();
} }
#endif /* DBX_DEBUGGING_INFO */ #endif /* DBX_DEBUGGING_INFO */
......
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