Re[2]: MI output command error

Konstantin Karganov
2005-03-10T09:33:09Z

Hello Bob,

> There is no way 1 MI input command can result in more than one MI output
> commands. The front end would probably send 1 command, after it got back
> the first "(gdb)", and then send another command for the second time.
> This would cause the front end's buffer to get out of sync with GDB.

> If anyone think's that this is not a problem, please let me know why.
I think that is not a problem. Look, in MI specification there are special
records for status-async-output ("information about the progress of
slow operation") and notify-async-output ("supplementary information
that the client should handle"). From these descriptions it is clearly
possible, that this records can be multiple (say, a progress of a very
slow operation :) ) plus the result-record for the command.

Another similar hint is that there are (oob-record)* in output rule.
Though it doesn't make several messages now, who knows all the use
cases and how it will behave in the next versions...

For myself, I decided to ignore "(gdb)" strings and wait for the
appropriate result-record (it will always appear, according to
grammar), collecting passing async-records at the same time.

I suppose that the only way to get in line with GDB responses is to
keep track of message tokens. And implementing the GUI frontend you
will have to use tokens anyhow.

--
Best regards,
Konstantin