aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-12-16 15:30:11 -0800
committerJim Wilson <wilson@gcc.gnu.org>1994-12-16 15:30:11 -0800
commit2dc172e8882d81ee5e083c53299ce2c6896a8c50 (patch)
tree6ca0a4916a77bb2222e2b534a98b380c7955028e /gcc
parente2cce0cf908143d436dbcc16ce5f81a49845e893 (diff)
downloadgcc-2dc172e8882d81ee5e083c53299ce2c6896a8c50.zip
gcc-2dc172e8882d81ee5e083c53299ce2c6896a8c50.tar.gz
gcc-2dc172e8882d81ee5e083c53299ce2c6896a8c50.tar.bz2
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_FUNCTION_FIRST,
DBX_OUTPUT_MAIN_SOURCE_FILE_END): Define. (ASM_OUTPUT_SOURCE_LINE): Modify it to output function relative stabs. From-SVN: r8659
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/sparc/litecoff.h50
1 files changed, 36 insertions, 14 deletions
diff --git a/gcc/config/sparc/litecoff.h b/gcc/config/sparc/litecoff.h
index a471cb3..df7f366 100644
--- a/gcc/config/sparc/litecoff.h
+++ b/gcc/config/sparc/litecoff.h
@@ -22,20 +22,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef ASM_OUTPUT_IDENT
-/* This is copied from final.c and sparc.h. */
-#undef ASM_OUTPUT_SOURCE_LINE
-#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
-{ if (write_symbols == SDB_DEBUG) { \
- fprintf ((FILE), "\t.ln\t%d\n", \
- ((sdb_begin_function_line > -1) \
- ? (LINE) - sdb_begin_function_line : 1)); \
- } else if (write_symbols == DBX_DEBUG) { \
- static int sym_lineno = 1; \
- fprintf ((FILE), ".stabn 68,0,%d,LM%d\nLM%d:\n", \
- (LINE), sym_lineno, sym_lineno); \
- sym_lineno += 1; \
- } }
-
#undef SELECT_SECTION
#undef SELECT_RTX_SECTION
#define BSS_SECTION_ASM_OP ".section\t\".bss\""
@@ -51,6 +37,42 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define DBX_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+/* These are all necessary because this is how gdb expects gcc to output
+ stabs in coff. */
+
+/* Be function-relative for block and source line stab directives. */
+
+#define DBX_BLOCKS_FUNCTION_RELATIVE 1
+
+/* but, to make this work, functions must appear prior to line info. */
+
+#define DBX_FUNCTION_FIRST
+
+/* Generate a blank trailing N_SO to mark the end of the .o file, since
+ we can't depend upon the linker to mark .o file boundaries with
+ embedded stabs. */
+
+#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
+ fprintf (FILE, \
+ "\t.text\n\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO)
+
+/* This is copied from final.c and sparc.h. */
+#undef ASM_OUTPUT_SOURCE_LINE
+#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
+{ if (write_symbols == SDB_DEBUG) { \
+ fprintf ((FILE), "\t.ln\t%d\n", \
+ ((sdb_begin_function_line > -1) \
+ ? (LINE) - sdb_begin_function_line : 1)); \
+ } else if (write_symbols == DBX_DEBUG) { \
+ static int sym_lineno = 1; \
+ fprintf (FILE, ".stabn 68,0,%d,.LM%d-", \
+ LINE, sym_lineno); \
+ assemble_name (FILE, \
+ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
+ fprintf (FILE, "\n.LM%d:\n", sym_lineno); \
+ sym_lineno += 1; \
+ } }
+
/* Support the ctors and dtors sections for g++. */
#undef INIT_SECTION_ASM_OP