This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: debug/3532: mips stabs are emitted wrongly for current binutils
- To: Daniel Jacobowitz <dan at debian dot org>
- Subject: Re: debug/3532: mips stabs are emitted wrongly for current binutils
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Mon, 2 Jul 2001 22:02:02 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
This is an untested patch. Let me know if it works.
H.J.
---
2001-07-02 H.J. Lu <hjl@gnu.org>
* gcc/config/mips/linux.h (ASM_OUTPUT_SOURCE_LINE): Defined.
--- gcc/config/mips/linux.h.stabs Mon Jul 2 21:53:09 2001
+++ gcc/config/mips/linux.h Mon Jul 2 21:58:00 2001
@@ -182,6 +182,22 @@ Boston, MA 02111-1307, USA. */
#undef SET_ASM_OP
#define SET_ASM_OP "\t.dummy\t"
+#undef ASM_OUTPUT_SOURCE_LINE
+#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
+do \
+ { \
+ static int sym_lineno = 1; \
+ fprintf (stream, "%sLM%d:\n\t%s %d,0,%d,%sLM%d", \
+ LOCAL_LABEL_PREFIX, sym_lineno, ASM_STABN_OP, N_SLINE, \
+ line, LOCAL_LABEL_PREFIX, sym_lineno); \
+ putc ('-', FILE); \
+ assemble_name (FILE, \
+ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
+ putc ('\n', FILE); \
+ sym_lineno++; \
+ } \
+while (0)
+
/* This is how we tell the assembler that two symbols have the
same value. */
#undef ASM_OUTPUT_DEF