Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [MI] Wrong error message when parsing invalid --thread-group
Date: Wed, 08 Dec 2010 16:35:00 -0000	[thread overview]
Message-ID: <m34oao6x5j.fsf@fleche.redhat.com> (raw)
In-Reply-To: <F7CE05678329534C957159168FA70DEC572E0C0DEF@EUSAACMS0703.eamcs.ericsson.se>	(Marc Khouzam's message of "Tue, 7 Dec 2010 20:23:44 -0500")

>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:

Marc> (gdb) interpreter-exec mi "28-break-insert --thread-group ix"
Marc> 28^error,msg="Invalid value for the '--thread' option"
Marc> The error msg says "thread" instead of "thread-group".

Thanks for noticing this :)

Marc>         error (_("Invalid value for the '%s' option"),
Marc> -              start[2] == 't' ? "--thread" : "--frame");
Marc> +              start[2] == 'f' ? "--frame" :
Marc> +                start[8] == '-' ? "--thread-group" : "--thread");

I think it would be better to do something using %*s.
This would mean computing a little extra state in the "if" bodies, but
that doesn't seem like a big deal.
I prefer this because it is less obscure and perhaps more future-proof.

Tom


  reply	other threads:[~2010-12-08 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  1:24 Marc Khouzam
2010-12-08 16:35 ` Tom Tromey [this message]
2010-12-08 16:53   ` Marc Khouzam
2010-12-09 19:22     ` Tom Tromey
2010-12-09 20:42       ` Marc Khouzam

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=m34oao6x5j.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=marc.khouzam@ericsson.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