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: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: debug/3532: mips stabs are emitted wrongly for current binutils
- From: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Date: Tue, 3 Jul 2001 01:01:22 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <20010702220202.A7083@lucon.org>
On Mon, Jul 02, 2001 at 10:02:02PM -0700, H . J . Lu wrote:
> 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
>
Sure, that or the version in dbxelf.h would do it. That will break
compatibility with every existing linux-mips toolchain. Do you really
want to do that? It will mean this version of GCC will absolutely
require MIPS_STABS_ELF.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer