Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH/committed] sim: rl78: clean up various warnings
Date: Wed, 05 May 2021 11:30:35 -0600	[thread overview]
Message-ID: <87k0odqe9w.fsf@tromey.com> (raw)
In-Reply-To: <20210505030449.25159-1-vapier@gentoo.org> (Mike Frysinger via Gdb-patches's message of "Tue, 4 May 2021 23:04:49 -0400")

>>>>> "Mike" == Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> writes:

Mike> Fix a logic error when processing commands where p was reassigned
Mike> to cmd and then has its leading whitespace scanned a 2nd time.
Mike> Handle short reads with fread().

Mike> -      /* Find the extent of the command word.  */
Mike> -      for (p = cmd; *p; p++)
Mike> -	if (isspace (*p))
Mike> -	  break;
Mike> -

I'm not sure it makes sense to completely delete this.
Perhaps instead just removing 'p = cmd' is correct?

It looks to me that this code is trying to parse a command name followed
by arguments.  Like, ideally, "monitor trace on" should set cmd="trace"
and args="on", but with the patch I don't think this will happen.

Tom

  reply	other threads:[~2021-05-05 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05  3:04 Mike Frysinger via Gdb-patches
2021-05-05 17:30 ` Tom Tromey [this message]
2021-05-05 18:52   ` Mike Frysinger via Gdb-patches
2021-05-05 19:05     ` Tom Tromey
2021-05-05 19:02   ` [PATCH] sim: m32c/rl78/rx: fix command parsing Mike Frysinger via Gdb-patches
2021-05-05 19:13     ` Tom Tromey
2021-05-05 23:03       ` [PATCH v2] " Mike Frysinger via Gdb-patches
2021-05-05 23:06       ` [PATCH v3] " Mike Frysinger via Gdb-patches

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=87k0odqe9w.fsf@tromey.com \
    --to=tom@tromey.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