From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Provide useful completer for "info registers"
Date: Wed, 10 Dec 2014 17:48:00 -0000 [thread overview]
Message-ID: <87y4qfmm4m.fsf@br87z6lw.de.ibm.com> (raw)
In-Reply-To: <54809C18.1030102@redhat.com> (Pedro Alves's message of "Thu, 04 Dec 2014 17:38:32 +0000")
On Thu, Dec 04 2014, Pedro Alves wrote:
> 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;
>
>> + }
>> + }
Good point. This is fixed in the new version; registers with empty
names are skipped now.
prev parent reply other threads:[~2014-12-10 17:48 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
2014-12-10 17:48 ` Andreas Arnez [this message]
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=87y4qfmm4m.fsf@br87z6lw.de.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/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