From: Pedro Alves <palves@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] cleanup: while (isspace) -> skip_spaces{,_const}
Date: Thu, 07 Mar 2013 16:39:00 -0000 [thread overview]
Message-ID: <5138C2D6.6070700@redhat.com> (raw)
In-Reply-To: <5137EE7A.9080500@redhat.com>
On 03/07/2013 01:33 AM, Keith Seitz wrote:
> @@ -2185,12 +2186,8 @@ registers_info (char *addr_exp, int fpregs)
> char *start;
> const char *end;
>
> - /* Keep skipping leading white space. */
> - if (isspace ((*addr_exp)))
> - {
> - addr_exp++;
> - continue;
> - }
> + /* Skip leading white space. */
> + addr_exp = skip_spaces (addr_exp);
This now continues forward even if *addr_exp is '\0',
while before the patch it didn't. The code read:
while (*addr_exp != '\0')
{
char *start;
const char *end;
/* Keep skipping leading white space. */
if (isspace ((*addr_exp)))
{
addr_exp++;
continue;
}
/* Discard any leading ``$''. Check that there is something
resembling a register following it. */
if (addr_exp[0] == '$')
addr_exp++;
if (isspace ((*addr_exp)) || (*addr_exp) == '\0')
error (_("Missing register name"));
And it seems to be we'll now reach that last error in that
case, while we wouldn't before. Can we trigger that with
"info register rip ", say?
--
Pedro Alves
next prev parent reply other threads:[~2013-03-07 16:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 1:34 Keith Seitz
2013-03-07 15:18 ` Tom Tromey
2013-03-07 16:39 ` Pedro Alves [this message]
2013-03-07 17:13 ` Keith Seitz
2013-03-07 17:20 ` Pedro Alves
2013-03-07 21:58 ` Keith Seitz
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=5138C2D6.6070700@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@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