This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] aarch64-core.xml: 32-bit cpsr -> 64-bit pstate
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>
- Cc: gdb-patches at sourceware dot org, pinskia at gmail dot com, catalin dot udma at freescale dot com
- Date: Tue, 08 Sep 2015 09:45:28 +0100
- Subject: Re: [PATCH] aarch64-core.xml: 32-bit cpsr -> 64-bit pstate
- Authentication-results: sourceware.org; auth=none
- References: <1441284969-30465-1-git-send-email-yao dot qi at linaro dot org> <55EE13C3 dot 6000008 at foss dot arm dot com> <86si6p726k dot fsf at gmail dot com>
On 09/08/2015 09:20 AM, Yao Qi wrote:
>
> AArch64 is still a new architecture, and there isn't much compatibility
> burden as other old archs have.
Under the same reasoning, you should be able to fix kgdb as well.
> Under this context, I think correctness
> is more important than compatibility. If we don't fix it now, we can't fix
> it forever. So it isn't an arbitrary change.
Simply cpsr->pstate like in your patch has user-visible changes as well. Do
users really expect to see "pstate" in "info registers"? If it really OK
that "print $cpsr" stops working?
But the change is really not OK as is. You can't have a server _not_
send "cpsr" and claim that the target description supports
the "org.gnu.gdb.aarch64.core" feature:
@node AArch64 Features
@subsection AArch64 Features
@cindex target descriptions, AArch64 features
The @samp{org.gnu.gdb.aarch64.core} feature is required for AArch64
targets. It should contain registers @samp{x0} through @samp{x30},
@samp{sp}, @samp{pc}, and @samp{cpsr}.
If we do go the cpsr->pstate direction, we'll have to add a new
target feature.
Thanks,
Pedro Alves