linux-mips
[Top] [All Lists]

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

To: Daniel Jacobowitz <dan@debian.org>
Subject: Re: gdb vs. gdbserver with -mips3 / 32bitmode userspace
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Wed, 1 Feb 2006 16:53:55 +0000 (GMT)
Cc: Johannes Stezenbach <js@linuxtv.org>, linux-mips@linux-mips.org
In-reply-to: <20060201164423.GA4891@nevyn.them.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> <20060201164423.GA4891@nevyn.them.org>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 1 Feb 2006, Daniel Jacobowitz wrote:

> All of this code is flat-out wrong, as far as I'm concerned.  I have a
> project underway which will fix it, as a nice side effect.

 Great!.

> GDB is trying to do something confusing, but admirable, here.  When
> you're running on a 64-bit system the full 64 bits are always there:
> even if the binary only uses half of them (is this true in Linux?  I
> don't remember if the relevant control bits get fudged, it's been a
> while; it's definitely true on some other systems).  Thus it's possible
> for a bogus instruction to corrupt the top half of a register, leading
> to otherwise inexplicable problems.

 Well, cp0.status.ux is always set with a 64-bit kernel.  It is not with a 
32-bit one.  A binary marked as o32/MIPS-III will work with either as long 
as 64-bit operations are not used.  For implementations that provide the 
cp0.status.xx bit, it is always set so that at least 32-bit MIPS-IV 
instructions work.

  Maciej

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