cortex-m xml register descriptions for m-system
Yao Qi
qiyaoltc@gmail.com
Tue Dec 15 08:55:00 GMT 2015
Christopher Friedt <chrisfriedt@gmail.com> writes:
> The first question I would ask for clarification from the binutils-gdb
> developers, is, which regnum is appropriate to assign to each of those
> m-system registers? Should these registers enumerate starting with 26
> (resuming from the xpsr)?
>
> Just for comparison, the current binutils-gdb arm-m-profile.xml is
> here (https://goo.gl/hpTye8), and the openocd variant is here
> (http://goo.gl/FFn56X).
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.
--
Yao (齐尧)
More information about the Gdb-patches
mailing list