This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Kill 'args' interface for MI commands

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]