This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS/Linux: Register number overlap in target descriptions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]