summaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-04 07:23:14 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-04 07:23:14 +0000
commit28a5f832b65ec0540756e525c01a342be559c27b (patch)
tree400024d6da2e3f7f20ce705a8d73a72617e73524 /gcc/dbxout.c
parentf62468fc315db3d29abd61bfb24e2249a7ced385 (diff)
downloadgcc-28a5f832b65ec0540756e525c01a342be559c27b.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 81717577973..9a9e44732d0 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -449,6 +449,8 @@ dbxout_function_end (void)
{
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);
/* Convert Ltext into the appropriate format for local labels in case
@@ -458,6 +460,16 @@ dbxout_function_end (void)
targetm.asm_out.internal_label (asmfile, "Lscope", 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
symbol and an empty string. */
#ifdef DBX_OUTPUT_NFUN
@@ -792,12 +804,7 @@ dbxout_function_decl (tree decl)
#ifdef DBX_OUTPUT_FUNCTION_END
DBX_OUTPUT_FUNCTION_END (asmfile, decl);
#endif
- if (use_gnu_debug_info_extensions
-#if defined(NO_DBX_FUNCTION_END)
- && ! NO_DBX_FUNCTION_END
-#endif
- && targetm.have_named_sections)
- dbxout_function_end ();
+ dbxout_function_end ();
}
#endif /* DBX_DEBUGGING_INFO */