From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28102 invoked by alias); 4 Dec 2007 15:10:59 -0000 Received: (qmail 28094 invoked by uid 22791); 4 Dec 2007 15:10:59 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Dec 2007 15:10:53 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 03BE59833F; Tue, 4 Dec 2007 15:10:52 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id D7A7898100; Tue, 4 Dec 2007 15:10:51 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IzZQB-0001AD-4Z; Tue, 04 Dec 2007 10:10:51 -0500 Date: Tue, 04 Dec 2007 15:10:00 -0000 From: Daniel Jacobowitz To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org, "Maciej W. Rozycki" Subject: Re: MIPS/Linux: Register number overlap in target descriptions Message-ID: <20071204151051.GA3966@caradoc.them.org> Mail-Followup-To: "Maciej W. Rozycki" , gdb-patches@sourceware.org, "Maciej W. Rozycki" References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00054.txt.bz2 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