+2004-08-12 Devang patel <dpatel@apple.com>
+
+ * 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.
+
2004-08-12 Janis Johnson <janis187@us.ibm.com>
* config/rs6000/altivec.h (vec_dst): Fix C++ functions whose first
#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);
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
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 */
}
}
+/* 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. */
/* BSS-segment variable with internal linkage. Value is its address. */
__define_stab (N_LCSYM, 0x28, "LCSYM")
+/* Begin function marker. */
+__define_stab (N_BNSYM, 0x2e, "BNSYM")
+
+/* End function marker. */
+__define_stab (N_ENSYM, 0x4e, "ENSYM")
+
/* Name of main routine. Only the name is significant.
This is not used in C. */
__define_stab (N_MAIN, 0x2a, "MAIN")
|_______________________________________________|
| Debug entries with bit 01 set are unused. |
| 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
- | 28 LCSYM | 2A MAIN | 2C | 2E |
+ | 28 LCSYM | 2A MAIN | 2C | 2E BNSYM |
| 30 PC | 32 NSYMS | 34 NOMAP | 36 |
| 38 OBJ | 3A | 3C OPT | 3E |
| 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
- | 48 BSLINE*| 4A DEFD | 4C | 4E |
+ | 48 BSLINE*| 4A DEFD | 4C | 4E ENSYM |
| 50 EHDECL*| 52 | 54 CATCH | 56 |
| 58 | 5A | 5C | 5E |
| 60 SSYM | 62 | 64 SO | 66 |
+2004-08-12 Devang patel <dpatel@apple.com>
+
+ * gcc.dg/darwin-20040809-2.c: New test.
+
2004-08-12 Janis Johnson <janis1872us.ibm.com>
* g++.dg/ext/altivec-12.C: New test.
--- /dev/null
+/* Test dead code strip support. */
+/* Contributed by Devang Patel <dpatel@apple.com> */
+
+/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-options "-g -fno-eliminate-unused-debug-symbols" } */
+
+int
+main ()
+{
+ return 0;
+}
+
+/* { dg-final { scan-assembler ".stabd.46,0,0" } } */
+/* { dg-final { scan-assembler ".stabd.78,0,0" } } */
+