cortex-m xml register descriptions for m-system
Pedro Alves
palves@redhat.com
Tue Dec 15 10:25:00 GMT 2015
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
More information about the Gdb-patches
mailing list