[PATCH] Provide useful completer for "info registers"
Pedro Alves
palves@redhat.com
Thu Dec 4 17:34:00 GMT 2014
Thanks Andreas,
I think a register completer is a great idea.
On 11/26/2014 08:54 PM, Sergio Durigan Junior wrote:
> I'd say this patch also needs a testcase :-). I know that this is
> architecture specific, so I'd personally be happy with something very
> simple, maybe testing only one or two architectures would be enough.
I think $pc, $sp, $fp (the user regs) should work everywhere.
See user-regs.c and std-regs.c.
Actually, looks like the patch misses considering those for completion?
See infcmd.c:registers_info:
/* A register name? */
{
int regnum = user_reg_map_name_to_regnum (gdbarch, start, end - start);
if (regnum >= 0)
{
/* User registers lie completely outside of the range of
normal registers. Catch them early so that the target
never sees them. */
if (regnum >= gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch))
{
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list