Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-10 Thread Richard Sandiford
H.J. Lu hjl.to...@gmail.com writes: On Sat, Dec 8, 2012 at 2:14 AM, Richard Sandiford rdsandif...@googlemail.com wrote: As far as the dwarf2out.c bits go, I think the original dbx_reg_number assert: gcc_assert (regno != INVALID_REGNUM); should become: gcc_assert (regno !=

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-10 Thread Steve Ellcey
On Mon, 2012-12-10 at 10:53 +, Richard Sandiford wrote: So please ignore that stupid suggestion. The comments about the MIPS parts still stand of course. Richard Here is a new patch. I made the MIPS changes and I also changed some code in dwarf2out.c. I was making some calls to

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-10 Thread Cary Coutant
2012-12-07 Steve Ellcey sell...@mips.com PR target/54061 rtl.h (IGNORED_DWARF_REGNUM): New. * dwarf2out.c (reg_loc_descriptor): Check for IGNORED_DWARF_REGNUM. (mem_loc_descriptor): Ditto. * config/mips/mips.h (ALL_COP_REG_FIRST): New.

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-10 Thread Richard Henderson
On 12/10/2012 08:50 AM, Steve Ellcey wrote: 2012-12-07 Steve Ellcey sell...@mips.com PR target/54061 rtl.h (IGNORED_DWARF_REGNUM): New. * dwarf2out.c (reg_loc_descriptor): Check for IGNORED_DWARF_REGNUM. (mem_loc_descriptor): Ditto. * config/mips/mips.h

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-08 Thread Richard Sandiford
Steve Ellcey sell...@mips.com writes: diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index b6a2290..bc99f29 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -16757,6 +16757,9 @@ mips_option_override (void) for (i = FP_REG_FIRST; i = FP_REG_LAST; i++)

[patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-07 Thread Steve Ellcey
This is my attempt to fix PR 54061, a bug where GCC aborts while trying to put out debug information for a co-processor register. My understanding is that gdb cannot access the coprocessor registers and so there is no valid debug information that can be put out for this case. So my fix is to

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-07 Thread H.J. Lu
On Fri, Dec 7, 2012 at 2:17 PM, H.J. Lu hjl.to...@gmail.com wrote: On Fri, Dec 7, 2012 at 1:59 PM, Steve Ellcey sell...@mips.com wrote: This is my attempt to fix PR 54061, a bug where GCC aborts while trying to put out debug information for a co-processor register. My understanding is that

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-07 Thread Steve Ellcey
On Fri, 2012-12-07 at 14:43 -0800, H.J. Lu wrote: I think you need a way to tell a bad register from a good register which doesn't have DWARF register number. Something like #define IGNORED_DWARF_REGNUM(INVALID_REGNUM - 1) The other option would be to have a new macro

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-07 Thread H.J. Lu
On Fri, Dec 7, 2012 at 2:55 PM, Steve Ellcey sell...@mips.com wrote: On Fri, 2012-12-07 at 14:43 -0800, H.J. Lu wrote: I think you need a way to tell a bad register from a good register which doesn't have DWARF register number. Something like #define IGNORED_DWARF_REGNUM

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-07 Thread Steve Ellcey
On Fri, 2012-12-07 at 14:43 -0800, H.J. Lu wrote: I think you need a way to tell a bad register from a good register which doesn't have DWARF register number. Here is a patch using your IGNORED_DWARF_REGNUM idea. Steve Ellcey sell...@mips.com 2012-12-07 Steve Ellcey sell...@mips.com

Re: [patch, mips, debug] Fix PR 54061, mips compiler aborts in testsuite

2012-12-07 Thread Cary Coutant
2012-12-07 Steve Ellcey sell...@mips.com PR target/54061 * rtl.h (IGNORED_DWARF_REGNUM): New. * dwarfwout.c (reg_loc_descriptor): Check for IGNORED_DWARF_REGNUM. Typo: s/dwarfwout/dwarf2out/ (mem_loc_descriptor): Ditto. * config/mips/mips.c