From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1141 invoked by alias); 6 Mar 2009 05:00:46 -0000 Received: (qmail 931 invoked by uid 22791); 6 Mar 2009 05:00:44 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO qnxmail.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Mar 2009 05:00:37 +0000 Received: from Nebula.ott.qnx.com (nebula.ott.qnx.com [10.42.3.30]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id AAA32446 for ; Fri, 6 Mar 2009 00:00:33 -0500 Received: from [127.0.0.1] ([192.168.20.97]) by Nebula.ott.qnx.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Mar 2009 00:00:34 -0500 Message-ID: <49B0ADEF.8060807@qnx.com> Date: Fri, 06 Mar 2009 05:00:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [patch] mips-tdep: info registers References: <20090223162602.GH26056@adacore.com> <20090227195607.GJ26056@adacore.com> <20090305191245.GB3744@adacore.com> <20090305192211.GA2342@caradoc.them.org> <20090305193512.GB3070@caradoc.them.org> <20090305225030.GD3744@adacore.com> <20090305230759.GA18795@caradoc.them.org> In-Reply-To: <20090305230759.GA18795@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Mail-Followup-To: gdb-patches@sourceware.org X-SW-Source: 2009-03/txt/msg00078.txt.bz2 oops... now I missed reply-to-all... Daniel Jacobowitz wrote: > On Thu, Mar 05, 2009 at 02:50:30PM -0800, Joel Brobecker wrote: >>> They should be aliases for the normal registers, e.g. $1 and $at >>> should mean the same thing. >> I have never implemented something like this before. How would you >> do it? I see that mips-tdep.c already has some table of register >> name aliases. This doesn't look like it can be connected to >> the "info registers" command, because of the way this command >> is implemented (it iterates over all register numbers, gets their >> associated names, and compares with the name used by the user). >> As far as I can tell, the only way that I can see is by adding >> a new series of pseudo-registers. > > Or change how info registers works, perhaps. > Maybe adding gdbarch_regname_to_regnum or something like that (which would avoid iterating through the registers and comparing returned register names).