linux-mips
[Top] [All Lists]

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

To: Thiemo Seufer <ths@networkno.de>, "Maciej W. Rozycki" <macro@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: gdb vs. gdbserver with -mips3 / 32bitmode userspace
From: Johannes Stezenbach <js@linuxtv.org>
Date: Wed, 1 Feb 2006 20:07:01 +0100
In-reply-to: <20060131192314.GB8826@linuxtv.org>
Mail-followup-to: Johannes Stezenbach <js@linuxtv.org>, Thiemo Seufer <ths@networkno.de>, "Maciej W. Rozycki" <macro@linux-mips.org>, linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060131171508.GB6341@linuxtv.org> <Pine.LNX.4.64N.0601311724340.31371@blysk.ds.pg.gda.pl> <20060131181414.GA8288@linuxtv.org> <20060131184253.GA23753@networkno.de> <20060131192314.GB8826@linuxtv.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11
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;

<Prev in Thread] Current Thread [Next in Thread>