GCC debug info question (PR 54061, mips coprocessor registers)
Steve Ellcey
sellcey@mips.com
Fri Aug 31 21:20:00 GMT 2012
I have a question about GCC debug info. The tests
gcc.c-torture/compile/mipscop-[1234].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?
Steve Ellcey
sellcey@mips.com
More information about the Gcc
mailing list