]> gcc.gnu.org Git - gcc.git/commitdiff
(DBX_BLOCKS_FUNCTION_RELATIVE, DBX_FUNCTION_FIRST,
authorJim Wilson <wilson@gcc.gnu.org>
Fri, 16 Dec 1994 23:30:11 +0000 (15:30 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 16 Dec 1994 23:30:11 +0000 (15:30 -0800)
DBX_OUTPUT_MAIN_SOURCE_FILE_END): Define.
(ASM_OUTPUT_SOURCE_LINE): Modify it to output function relative stabs.

From-SVN: r8659

gcc/config/sparc/litecoff.h

index a471cb3194a5119d78362ed3a742b665be70b7e4..df7f3669153789cceb65fd7247fa60020b1e583c 100644 (file)
@@ -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
This page took 0.071477 seconds and 5 git commands to generate.