This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Provide useful completer for "info registers"
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>, Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 04 Dec 2014 17:34:36 +0000
- Subject: Re: [PATCH] Provide useful completer for "info registers"
- Authentication-results: sourceware.org; auth=none
- References: <87h9xnqje8 dot fsf at br87z6lw dot de dot ibm dot com> <87ioi1bs3x dot fsf at redhat dot com>
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