This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cortex-m xml register descriptions for m-system


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]