From: Pedro Alves <palves@redhat.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Provide useful completer for "info registers"
Date: Thu, 04 Dec 2014 17:38:00 -0000 [thread overview]
Message-ID: <54809C18.1030102@redhat.com> (raw)
In-Reply-To: <87h9xnqje8.fsf@br87z6lw.de.ibm.com>
Also, ...
On 11/25/2014 05:28 PM, Andreas Arnez wrote:
> + for (i = 0; i < n_regs; i++)
> + {
> + const char *reg_name = gdbarch_register_name (gdbarch, i);
> +
> + if (reg_name != NULL && strncmp (text, reg_name, len) == 0)
> + VEC_safe_push (char_ptr, result, xstrdup (reg_name));
Not sure under which conditions "len" could be zero here. If it may,
note that some registers have empty names. See default_print_registers_info:
/* If the register name is empty, it is undefined for this
processor, so don't display anything. */
if (gdbarch_register_name (gdbarch, i) == NULL
|| *(gdbarch_register_name (gdbarch, i)) == '\0')
continue;
> + }
> + }
Thanks,
Pedro Alves
next prev parent reply other threads:[~2014-12-04 17:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 17:28 Andreas Arnez
2014-11-26 20:54 ` Sergio Durigan Junior
2014-11-26 21:52 ` Sergio Durigan Junior
2014-11-28 18:14 ` Andreas Arnez
2014-11-28 20:39 ` Sergio Durigan Junior
2014-12-04 17:34 ` Pedro Alves
2014-12-10 17:36 ` Andreas Arnez
2014-12-10 18:21 ` Pedro Alves
2014-12-04 17:38 ` Pedro Alves [this message]
2014-12-10 17:48 ` Andreas Arnez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54809C18.1030102@redhat.com \
--to=palves@redhat.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).