This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM
- From: Yao Qi <yao at codesourcery dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 24 Dec 2010 13:10:30 +0800
- Subject: Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM
- References: <201012231756.oBNHuAjh011029@d06av02.portsmouth.uk.ibm.com>
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
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 },
};