This is the mail archive of the gdb@sourceware.org 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: [MI] argv/argc/args


On Wednesday 25 June 2008 18:45:52 you wrote:
> 
> > From: Vladimir Prus
> > Sent: Wednesday, June 25, 2008 5:06 AM
> > 
> > In GDB 6.8 codebase, there were 3 different ways an MI 
> > command can be processed:
> > 
> > 1. Sneaking via CLI directly (calling execute_command)
> > 2. Calling a function, that takes argc/argv pair
> > 3. Calling a function, that takes a string 'args' parameter with
> > the raw part of MI command string after the command name.
> > 
> > Some time ago, I've checked in a patch to remove (3), to clarify the
> > code. Dan has raised concerns about backward compatibility, so here's
> > an attempt to analyze the change afresh.
> 
> I never quite understood the quoting for MI commands.  If I recall,
> some commands need quotes when they use spaces, while others are not
> allowed to use quotes.  I does cause a bit of a headache.

This is the direct result of using 3 different approaches. (2) above
follow the MI quoting rules, while (1) and (3) do not. For example,
the 'break-condition' is sneaked via CLI, so does not like quotes,
while -var-create is well-behaving MI command, and needs quotes.

> What is the impact of removing (3) above?  Quotes will be needed
> or will not be allowed?

Will be needed, except for commands handled via (1). Ideally, we'd require
all commands to use MI quoting, but this might break lots of things. You
might recall that our non-stop delivery to you started to require quoting for
-break-condition -- which you did not exactly like :-)

- Volodya


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