[rfc] Avoid MIPS port breakage on large registers

Daniel Jacobowitz drow@false.org
Mon May 21 14:09:00 GMT 2007


On Mon, May 21, 2007 at 03:01:30PM +0100, Maciej W. Rozycki wrote:
> On Mon, 21 May 2007, Daniel Jacobowitz wrote:
> 
> > I am about to post target-described register support for the MIPS
> > port.  One thing I noticed while testing it was that "info registers"
> > went off into the woods on O32 when I added an extra 64-bit register;
> > there's an unsigned loop until regsize - abi_regsize, which is
> > supposed to catch 32-bit registers on N64, but runs almost forever
> > given a 64-bit integer register on O32.  This patch just prints such
> > registers on their own row.
> 
>  Hmm, out of curiosity: what kind of 64-bit register have you got on o32?  

It's the $restart "register" that I just posted support for.
Gdbserver doesn't know the program's ABI, so a mips64-linux gdbserver
always reports 64-bit registers.  GDB knows to translate $pc to
32-bit, but mips-tdep.c doesn't know anything about special handling
for $restart (and I didn't think it was important to add, with this
bug fixed).

The register only ever holds internal errno values (0 or 512-514).

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list