This is the mail archive of the
mailing list for the GCC project.
GCC debug info question (PR 54061, mips coprocessor registers)
- From: "Steve Ellcey " <sellcey at mips dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 31 Aug 2012 14:20:04 -0700
- Subject: GCC debug info question (PR 54061, mips coprocessor registers)
I have a question about GCC debug info. The tests
gcc.c-torture/compile/mipscop-.c fail when compiled
with -g on MIPS (they are mips specific tests). This has
been reported in bugzilla as PR 54061.
The problem is:
register unsigned int cp0count asm ("$c0r1");
This is a coprocessor register and in mips_option_override
we set mips_dbx_regno for this register to INVALID_REGNUM
This means that DBX_REGISTER_NUMBER returns INVALID_REGNUM
and we abort on the assert in dbx_reg_number in dwarf2out.c.
My understanding is that gdb doesn't know how to handle mips
coprocessor registers so I think gcc should just not put out
any debug information for this register variable. Is that
possible? I couldn't find anyway to do it in GCC. Or should
GCC just put out the register number for DBX_REGISTER_NUMBER
instead of INVALID_REGNUM even if gdb may choke on it?