This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: cortex-m xml register descriptions for m-system
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, Christopher Friedt <chrisfriedt at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 15 Dec 2015 10:25:52 +0000
- Subject: Re: cortex-m xml register descriptions for m-system
- Authentication-results: sourceware.org; auth=none
- References: <CAF4BF-RuPwFWfDa2Sp7MzYjF8bo1K3xb=jMThSpK4T7gTe+whQ at mail dot gmail dot com> <86vb80nlac dot fsf at gmail dot com>
On 12/15/2015 08:55 AM, Yao Qi wrote:
> The number doesn't matter, but the name does. In the target
> descriptions from openocd, the register is named as "xPSR" in
> standard feature org.gnu.gdb.arm.m-profile.
>
> { ARMV7M_xPSR, "xPSR", 32, REG_TYPE_INT, "general", "org.gnu.gdb.arm.m-profile" },
>
> however, in gdb/arm-tdep.c, gdb expects "xpsr"
>
> if (is_m)
> valid_p &= tdesc_numbered_register (feature, tdesc_data,
> ARM_PS_REGNUM, "xpsr");
> else
> valid_p &= tdesc_numbered_register (feature, tdesc_data,
> ARM_PS_REGNUM, "cpsr");
>
> so I suspect that GDB won't accept the org.gnu.gdb.arm.m-profile feature
> from openocd.
>
No, that's fine actually -- tdesc_numbered_register uses strcasecmp.
>From https://sourceware.org/gdb/onlinedocs/gdb/Target-Description-Format.html:
"The names of registers are not case sensitive for the purpose of
recognizing standard features, but gdb will only display registers
using the capitalization used in the description. "
Thanks,
Pedro Alves