Re: RFC: MI output during program execution

Nick Roberts
2005-08-09T17:32:10Z

> I'm a bit nervous about this literal testing of certain commands: why
> not allow _any_ CLI commands to be supported in this way? I
> understand that you were trying to mention every command that runs the
> inferior, but the implication is that we will need to remember to add
> to this list any new command that has similar effects. That sounds
> like a PITA; could a more general solution be devised?

Indeed. I missed out "continue" for a start. Not all the CLI commands have
direct MI counterparts. For commands that run the inferior the correspondence
is particular clear e.g.

enum mi_cmd_result
mi_cmd_exec_run (char *args, int from_tty)
{
/* FIXME: Should call a libgdb function, not a cli wrapper */
return mi_execute_async_cli_command ("run", args, from_tty);
}

i.e they are just wrappers for the CLI command.

> But I'm afraid that I'm somehow missing something, so could you please
> elaborate on the design of the solution you propose?

It's just another fix and not a general solution. Reading the comments for MI
there are already many such fixes (mi_execute_async_cli_command is an
example). That doesn't justify further fixes, of course, and something more
general would clearly be better but beyond my current scope.

Nick