From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11100 invoked by alias); 22 Dec 2010 17:35:35 -0000 Received: (qmail 10943 invoked by uid 22791); 22 Dec 2010 17:35:32 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (94.185.240.25) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 22 Dec 2010 17:35:25 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 22 Dec 2010 17:35:22 +0000 Received: from [10.1.67.34] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 22 Dec 2010 17:35:21 +0000 Subject: Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM From: Richard Earnshaw To: Yao Qi Cc: gdb-patches@sourceware.org In-Reply-To: <4D089CD6.5030500@codesourcery.com> References: <4D0896E0.1030707@codesourcery.com> <4D089CD6.5030500@codesourcery.com> Date: Wed, 22 Dec 2010 17:54:00 -0000 Message-Id: <1293039320.11190.9.camel@e102346-lin.cambridge.arm.com> Mime-Version: 1.0 X-MC-Unique: 110122217352200201 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable 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: 2010-12/txt/msg00406.txt.bz2 On Wed, 2010-12-15 at 18:47 +0800, Yao Qi wrote: > On 12/15/2010 06:22 PM, Yao Qi wrote: > > Once this patch is applied, we leave more flexibility to backend to > > determine what is the correct register number given a register alias. >=20 > This patch is to implement user_register_name on ARM. With this, we can > handle alias "fp" according to the current frame's mode (ARM or Thumb). >=20 > Regression testing is still running on ARM. Comments are welcome. I think this is misguided. Historically, the ARM back-end to gcc defined an alias of fp for R11, whether in ARM or Thumb mode. The fact that the Thumb-1 back-end doesn't use that register as a frame-pointer is not particularly relevant. The situation is quite messy, as GCC uses different registers in Thumb-1 and Thumb-2 code for a frame pointer; your code doesn't handle that case, but seems to assume that all thumb code will use R7 as the frame pointer. Overall, I think it's just best if 'fp' is treated like any other standard register alias on ARM and therefore that it always refers to R11. If we really want a register alias that refers to the *current* frame pointer register, then we need a new name that doesn't conflict with anything in the current or previous ABIs. Maybe a slightly-long-winded name like 'frame'? R.