From: Yao Qi <yao@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM
Date: Thu, 23 Dec 2010 04:10:00 -0000 [thread overview]
Message-ID: <4D12C3F4.8080301@codesourcery.com> (raw)
In-Reply-To: <201012222202.oBMM22Lg020960@d06av02.portsmouth.uk.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]
On 12/23/2010 06:02 AM, Ulrich Weigand wrote:
> Yao Qi wrote:
>
>> Good catch! set_gdbarch_deprecated_fp_regnum is called in
>> arm_gdbarch_init since 2003, introduced by this patch "Deprecate
>> TARGET_READ_FP, read_fp and FP_REGNUM"
>> http://sourceware.org/ml/gdb-patches/2003-04/msg00471.html
>>
>> set_gdbarch_deprecated_fp_regnum is no longer used in most of targets,
>> and I don't see any reason why we have to keep it in ARM, so I draft
>> this one-line patch.
>
> Huh, I didn't even see this, I was refering to this line:
> { "fp", 11 },
> in arm_register_aliases. As long as this line is there, changes to
> set_gdbarch_deprecated_fp_regnum probably don't matter as this isn't
> even evaluated, since "fp" is just treated as a user register instead
> of a standard register.
>
Ulrich,
changes to set_gdbarch_deprecated_fp_regnum matters here.
There are two "fp", "pc" and "sp" in user registers. The first one is
added from builtin_user_regs (fp, pc, sp, ps) in user_regs_init, and the
second one is added from `arm_register_aliases' in our case. The first
one is always used, so these three in arm_register_aliases are redundant.
{ "fp", 11 },
{ "sp", 13 },
{ "pc", 15 },
How about this patch to remove them?
> But you're right that you need to remove the set_gdbarch_deprecated_fp_regnum
> *also* in order to get the full default logic I had described.
>
Regression test is done. Two failures are fixed.
FAIL: gdb.mi/mi-var-display.exp: create variable a2 in different scope
FAIL: gdb.mi/mi2-var-display.exp: create variable a2 in different scope
Committed.
--
Yao (é½å°§)
[-- Attachment #2: remove_arm_sp_fp_pc_alias.patch --]
[-- Type: text/x-patch, Size: 530 bytes --]
2010-12-23 Yao Qi <yao@codesourcery.com>
arm-tdep.c: (arm_register_aliases): Remove sp, pc, and fp
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 636c1de..11c75cd 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -175,12 +175,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 },
};
next prev parent reply other threads:[~2010-12-23 3:37 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 [this message]
2010-12-23 18:37 ` Ulrich Weigand
2010-12-24 5:16 ` Yao Qi
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=4D12C3F4.8080301@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/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