This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [mi] -stack-list-arguments --simple-values
> Nick> People often lament the poor syntax of MI but it really needs a
> Nick> plan to replace it with something better. However, such a plan
> Nick> would really need a maintainer to lead it and doesn't really work
> Nick> on a Write After Approval basis.
>
> I think we can differentiate here between a plan and the patches
> implementing the plan.
>
> In my view we could discuss the plan on the gdb list and reach some kind
> of agreement. This can be initiated by anybody. If you want to start
> it, I will try to help ensure that the discussion reaches some
> conclusion.
Thanks for the offer but I have found it hard to convince maintainers to
make changes that they are not interested in. For example, changing the
behaviour of "record stop" to not need confirmation when the server prefix
is used:
http://sourceware.org/ml/gdb/2009-07/msg00153.html
I see this as an uncontroversial change that wouldn't affect other GDB
developers. It probably wouldn't benefit them either but in Emacs development
the rule is just basically "do no harm".
With larger changes, e.g. using notifications for breakpoints, it can be
harder to reach a conclusion.
> I think if there is general agreement about the direction then patch
> review need not be a big problem. I suppose my view is based on the
> idea that the plan is probably where most of the contention lies, and
> usually the implementation bits are straightforward.
>
> Volodya> FWIW, both the above issue is universally believed to be not
> Volodya> good, so patches to introduce MI3 version and switch select
> Volodya> commands to "right" syntax appear to be fairly simple.
>
> Nick> I quite like the idea of incrementally changing the output with
> Nick> new commands because as soon as MI3 is released, you can be sure
> Nick> people will find shortcomings with that. You could say it is a
> Nick> more agile approach.
>
> What do you suggest?
Just that the output of some commands break the formal syntax rules, or
at least, parsing would be easier if:
"[" RESULT ( "," RESULT )* "]"
wasn't admissible as in a LIST. This could be circumvented, by adding new
commands ("embrace and extend") that provide a more consistent rather than
adding another MI level.
In Emacs, Dmitry Dzhus, has parsed the GDB/MI output as JSON objects and,
by way of an example, we might submit a patch for the new command
-stack-list-locals-and-args that was discussed earlier on the gdb mailing
list.
Of course, changes in asynchronous output probably would need a new MI level.
--
Nick http://www.inet.net.nz/~nickrob