From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19668 invoked by alias); 24 Dec 2010 05:10:42 -0000 Received: (qmail 19660 invoked by uid 22791); 24 Dec 2010 05:10:41 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Dec 2010 05:10:36 +0000 Received: (qmail 27842 invoked from network); 24 Dec 2010 05:10:34 -0000 Received: from unknown (HELO ?192.168.1.11?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Dec 2010 05:10:34 -0000 Message-ID: <4D142B46.7@codesourcery.com> Date: Fri, 24 Dec 2010 05:16:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ulrich Weigand CC: gdb-patches@sourceware.org Subject: Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM References: <201012231756.oBNHuAjh011029@d06av02.portsmouth.uk.ibm.com> In-Reply-To: <201012231756.oBNHuAjh011029@d06av02.portsmouth.uk.ibm.com> Content-Type: multipart/mixed; boundary="------------020305010603010808040707" 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/msg00450.txt.bz2 This is a multi-part message in MIME format. --------------020305010603010808040707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 387 On 12/24/2010 01:56 AM, Ulrich Weigand wrote: > >> { "fp", 11 }, >> { "sp", 13 }, >> { "pc", 15 }, >> >> How about this patch to remove them? > > If they don't actually take effect, I agree it is better to remove them. > However, I'd prefer to see some comment in the code explaining why these > names are not (and should not be) added as aliases ... How about this? -- Yao --------------020305010603010808040707 Content-Type: text/x-patch; name="remove_arm_sp_fp_pc_alias_1224.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="remove_arm_sp_fp_pc_alias_1224.patch" Content-length: 1018 gdb/ * arm-tdep.c (arm_register_aliases): Remove sp, pc, and fp. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 2a9303c..959c449 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -135,7 +135,10 @@ static const char *arm_force_mode_string = "auto"; /* Number of different reg name sets (options). */ static int num_disassembly_options; -/* The standard register names, and all the valid aliases for them. */ +/* The standard register names, and all the valid aliases for them. Note + that `fp', `sp' and `pc' are not added in this alias list, because they + have been added as builtin user registers in + std-regs.c:_initialize_frame_reg. */ static const struct { const char *name; @@ -176,12 +179,9 @@ static const struct { "tr", 9 }, /* Special names. */ { "ip", 12 }, - { "sp", 13 }, { "lr", 14 }, - { "pc", 15 }, /* Names used by GCC (not listed in the ARM EABI). */ { "sl", 10 }, - { "fp", 11 }, /* A special name from the older ATPCS. */ { "wr", 7 }, }; --------------020305010603010808040707--