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: Yao Qi <qiyaoltc at gmail dot com>
- To: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org, pinskia at gmail dot com, catalin dot udma at freescale dot com
- Date: Tue, 08 Sep 2015 09:20:03 +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>
Richard Earnshaw <Richard.Earnshaw@foss.arm.com> writes:
> Won't this also break any situation where the gdbserver knowledge is
> embedded in a HW stub? You're assuming that we can just update all
> those servers and everything will be fine and dandy. I don't think we
> can't just change this arbitrarily.
Yes, it will break any existing debugging stubs, including old gdbserver
and jtag probes, which think the register in the target description
(cpsr, psate or whatever) is 32-bit.
However, I don't assume "we can just update all those servers and
everything will be fine and dandy". As I said in the first mail,
this change will break the compatibility.
AArch64 is still a new architecture, and there isn't much compatibility
burden as other old archs have. 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.
We did change the size of the register in the target description to
64-bit back and forth in 2013 and 2014, but I don't hear any complaints
on this from HW jtag probes providers.
>
> I think kgdb should do what everyone else has been doing and simply
> return the bottom 32 bits.
I think kgdb is correct. I don't know what "everyone else" is. As far
as I can see, openocd doesn't support aarch64 now, but there are some
patches to add aarch64 support http://openocd.zylin.com/#/c/2501/14
the register (named CPSR in the openocd patches) is 64-bit, which looks
right to me.
--
Yao (éå)