aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2004-08-12 14:32:56 -0700
committerDevang Patel <dpatel@gcc.gnu.org>2004-08-12 14:32:56 -0700
commit8fa5469d38b7e27f7f897fbe756d2902b54b4de5 (patch)
tree85c5760826de54f9a125455e8e36d8ebb96299eb /gcc/dbxout.c
parent950a175b04eda2cdcea01a61a3c4a09a23b6d2c6 (diff)
downloadgcc-8fa5469d38b7e27f7f897fbe756d2902b54b4de5.zip
gcc-8fa5469d38b7e27f7f897fbe756d2902b54b4de5.tar.gz
gcc-8fa5469d38b7e27f7f897fbe756d2902b54b4de5.tar.bz2
dbxout.c (dbxout_begin_prologue): New function.
* dbxout.c (dbxout_begin_prologue): New function. (dbx_debug_hooks): Use new begin prologue hook. (dbxout_function_end): Emit N_ENSYM. * stab.def (N_BNSYM, N_ENSYM): Define and document these two new stabs. testsuite: gcc.dg/darwin-20040809-2.c: New test. From-SVN: r85908
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 9a9e447..55f2275 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -372,6 +372,7 @@ static void dbxout_handle_pch (unsigned);
#if defined (DBX_DEBUGGING_INFO)
static void dbxout_source_line (unsigned int, const char *);
+static void dbxout_begin_prologue (unsigned int, const char *);
static void dbxout_source_file (FILE *, const char *);
static void dbxout_function_end (void);
static void dbxout_begin_function (tree);
@@ -391,8 +392,7 @@ const struct gcc_debug_hooks dbx_debug_hooks =
dbxout_end_block,
debug_true_tree, /* ignore_block */
dbxout_source_line, /* source_line */
- dbxout_source_line, /* begin_prologue: just output
- line info */
+ dbxout_begin_prologue, /* begin_prologue */
debug_nothing_int_charstar, /* end_prologue */
debug_nothing_int_charstar, /* end_epilogue */
#ifdef DBX_FUNCTION_FIRST
@@ -481,6 +481,9 @@ dbxout_function_end (void)
assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));
fprintf (asmfile, "\n");
#endif
+
+ if (!flag_debug_only_used_symbols)
+ fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_ENSYM);
}
#endif /* DBX_DEBUGGING_INFO */
@@ -753,6 +756,17 @@ dbxout_source_file (FILE *file, const char *filename)
}
}
+/* Output N_BNSYM and line number symbol entry. */
+
+static void
+dbxout_begin_prologue (unsigned int lineno, const char *filename)
+{
+ if (!flag_debug_only_used_symbols)
+ fprintf (asmfile, "%s%d,0,0\n", ASM_STABD_OP, N_BNSYM);
+
+ dbxout_source_line (lineno, filename);
+}
+
/* Output a line number symbol entry for source file FILENAME and line
number LINENO. */