Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Kill 'args' interface for MI commands
Date: Thu, 24 Apr 2008 16:34:00 -0000	[thread overview]
Message-ID: <20080424140815.GA8110@caradoc.them.org> (raw)
In-Reply-To: <fuq30k$n3v$1@ger.gmane.org>

On Thu, Apr 24, 2008 at 05:47:10PM +0400, Vladimir Prus wrote:
> Vladimir Prus wrote:
> 
> > 
> > Presently, each MI command is implemented with a function, but there are
> > two different interfaces -- old uses "char *" to pass all parameters lumped
> > together, while new one uses "char ** + int", like argc/argv.
> > 
> > This patch kills the old interface completely. Checked in.
> 
> I've attached a wrong patch, this is what I've actually checked in.

Is this compatible?

Above the bit of mi-parse.c you changed is this:

  /* For new argv commands, attempt to return the parsed argument
     list. */
  if (parse->cmd->argv_func != NULL)
    {
      mi_parse_argv (chp, parse);

If that fails, then an error is output.  So anything not properly
quoted as an MI command is invalid.  Which would be nice, except
that's not how things worked before.

For example, a command which previously used args_func and had
argv_func == NULL is -exec-run.  It wasn't documented to take
arguments, but it did.  They were passed unmodified to the shell
and now they're stripped of MI quoting.  Another was -target-select,
which folks pass all sorts of hairy strings to, and -target-download,
which sometimes takes a filename - previously not MI quoted.  But
it gets passed to load which removes its own quotes.  So now
-target-download "my file.exe" is going to fail because the CLI
will get "load my file.exe".

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2008-04-24 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24 15:59 Vladimir Prus
2008-04-24 16:02 ` Vladimir Prus
2008-04-24 16:34   ` Daniel Jacobowitz [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=20080424140815.GA8110@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.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