public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Bob Rossi <bob@brasko.net>
Cc: gdb@sources.redhat.com
Subject: Re: -inferior-tty-show and -inferior-tty-set
Date: Wed, 13 Jul 2005 22:55:00 -0000	[thread overview]
Message-ID: <17109.40009.659224.609729@farnswood.snap.net.nz> (raw)
In-Reply-To: <20050713224555.GA5383@white>

 > OK. There could be a problem here. Not sure. A valid MI option is,
 >  mi-command ==>
 >   [ token ] "-" operation ( " " option )* [ " --" ] ( " " parameter )* nl
 > basically, arguments to an mi function begin with a '-'. 
 > 
 > So,
 >    (gdb)
 >    -file-list-exec-source-file a
 >    ^done,line="1",file="test.c",fullname="/home/bob/cvs/gdb/original/objdir/gdb/test.c"
 >    (gdb)
 >    -file-list-exec-source-file -a
 >    &"mi_cmd_file_list_exec_source_file: Unknown option ``a''\n"
 >    ^error,msg="mi_cmd_file_list_exec_source_file: Unknown option ``a''"
 >    (gdb)
 > 
 > Should we make mi_valid_noargs take care of the case when invalid
 > arguments are passed to the MI command? or should mi_getopt return an
 > error? I'll have to think a little about this.

Instead of

  if ( !mi_valid_noargs("mi_cmd_file_list_exec_source_file", argc, argv) )
    error (_("mi_cmd_file_list_exec_source_file: Usage: No args"));

why not just use:

  if (argc > 0)
    error (_("mi_cmd_file_list_exec_source_file: Usage: No args"));

Incidentally there is no mention of mi_valid_noargs in the ChangeLogs.  If
the above suggestion works, perhaps its not needed and it could be removed.

Nick

  reply	other threads:[~2005-07-13 22:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13  2:57 Nick Roberts
2005-07-13  3:59 ` Daniel Jacobowitz
2005-07-13 22:46 ` Bob Rossi
2005-07-13 22:55   ` Nick Roberts [this message]
2005-07-13 23:39     ` Bob Rossi
2005-07-14  6:36       ` Nick Roberts

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=17109.40009.659224.609729@farnswood.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=bob@brasko.net \
    --cc=gdb@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).