Re: gdb vs. gdbserver with -mips3 / 32bitmode userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 31, 2006, Johannes Stezenbach wrote:
> On Tue, Jan 31, 2006, Thiemo Seufer wrote:
> > On Tue, Jan 31, 2006 at 07:14:14PM +0100, Johannes Stezenbach wrote:
> > [snip]
> > > Yes, that's why I said I'm confused about mips_isa_regsize() vs.
> > > mips_abi_regsize().
> > > 
> > > mips_abi_regsize() correctly says the register size is 32bit for o32,
> > > but mips_register_type() calls mips_isa_regsize(), not
> > > mips_abi_regsize(). That's why I chose to "fix" mips_isa_regsize().
> > > 
> > > Or should mips_register_type() simply call mips_abi_regsize()?
> > 
> > Without having had a look at the code I think that's the right fix.
> 
> OK, I'll test if that works for me, and post results here

OK, after some testing, the patch below seems to work.

Johannes


--- gdb-6.3/gdb/mips-tdep.c.orig	2004-10-15 09:25:03.000000000 +0200
+++ gdb-6.3/gdb/mips-tdep.c	2006-01-31 20:27:54.000000000 +0100
@@ -716,16 +716,16 @@ mips_register_type (struct gdbarch *gdba
       && (regnum % NUM_REGS) < mips_regnum (current_gdbarch)->fp0 + 32)
     {
       /* The floating-point registers raw, or cooked, always match
-         mips_isa_regsize(), and also map 1:1, byte for byte.  */
+         mips_abi_regsize(), and also map 1:1, byte for byte.  */
       switch (gdbarch_byte_order (gdbarch))
 	{
 	case BFD_ENDIAN_BIG:
-	  if (mips_isa_regsize (gdbarch) == 4)
+	  if (mips_abi_regsize (gdbarch) == 4)
 	    return builtin_type_ieee_single_big;
 	  else
 	    return builtin_type_ieee_double_big;
 	case BFD_ENDIAN_LITTLE:
-	  if (mips_isa_regsize (gdbarch) == 4)
+	  if (mips_abi_regsize (gdbarch) == 4)
 	    return builtin_type_ieee_single_little;
 	  else
 	    return builtin_type_ieee_double_little;
@@ -738,7 +738,7 @@ mips_register_type (struct gdbarch *gdba
     {
       /* The raw or ISA registers.  These are all sized according to
 	 the ISA regsize.  */
-      if (mips_isa_regsize (gdbarch) == 4)
+      if (mips_abi_regsize (gdbarch) == 4)
 	return builtin_type_int32;
       else
 	return builtin_type_int64;


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux