This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MIPS/Linux: Register number overlap in target descriptions
- From: Daniel Jacobowitz <drow at false dot org>
- To: "Maciej W. Rozycki" <macro at mips dot com>
- Cc: gdb-patches at sourceware dot org, "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Tue, 4 Dec 2007 10:10:51 -0500
- Subject: Re: MIPS/Linux: Register number overlap in target descriptions
- References: <Pine.LNX.4.61.0712041447380.21152@perivale.mips.com>
On Tue, Dec 04, 2007 at 03:01:33PM +0000, Maciej W. Rozycki wrote:
> Hello,
>
> Due to the way target register numbers are assigned in the target
> description (using the last number used plus one unless overridden) we
> have two registers overlapping each other. Specifically, both "pc" and
> "f0" are assigned 37 as their number, which happens because the
> description of "f0" is provided after one of "cause", which specifies 36
> explicitly and "pc" is assigned 37 likewise. I gather it breaks register
> numbering as such too as there are places elsewhere in the code that refer
> to some registers by number literally.
No, those numberings are different. They are used for internal
register layout, but only sent to the target if there is no XML
description. So a mismatch is fine except when you're trying to
retain compatibility with legacy stubs.
Of course, I was trying. Not sure how I missed this - did it have
any symptoms?
Patch is OK. After this, I hope the register numbers line up with
mips-elf again; I think they do.
--
Daniel Jacobowitz
CodeSourcery