Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM
Date: Fri, 24 Dec 2010 05:16:00 -0000	[thread overview]
Message-ID: <4D142B46.7@codesourcery.com> (raw)
In-Reply-To: <201012231756.oBNHuAjh011029@d06av02.portsmouth.uk.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

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

[-- Attachment #2: remove_arm_sp_fp_pc_alias_1224.patch --]
[-- Type: text/x-patch, Size: 1018 bytes --]

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 },
 };

  reply	other threads:[~2010-12-24  5:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 10:22 [patch 1/2] New gdbarch hook user_register_name Yao Qi
2010-12-15 10:48 ` [patch 2/2] Implement gdbarch hook user_register_name on ARM Yao Qi
2010-12-21 19:07   ` Ulrich Weigand
2010-12-22 17:44     ` Yao Qi
2010-12-22 18:12       ` Mark Kettenis
2010-12-23  7:19         ` Yao Qi
2010-12-23  1:54       ` Ulrich Weigand
2010-12-23  4:10         ` Yao Qi
2010-12-23 18:37           ` Ulrich Weigand
2010-12-24  5:16             ` Yao Qi [this message]
2010-12-28 14:52               ` Ulrich Weigand
2010-12-22 17:54   ` Richard Earnshaw
2010-12-23  2:05     ` Ulrich Weigand
2010-12-23  3:37       ` Joel Brobecker
2010-12-23 12:08         ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D142B46.7@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox