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: [PATCH] Provide useful completer for "info registers"


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


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