cleanup mi error message handling

Daniel Jacobowitz drow@false.org
Tue Mar 25 01:00:00 GMT 2008


On Tue, Mar 25, 2008 at 11:37:00AM +1200, Nick Roberts wrote:
> Emacs isn't currently using this output, so I'm not speaking from experience,
> but how does the front end determine which messages are for the user?
> 
> Currently most messages that are due to frontend errors go through error ()
> so I guess I'm suggesting the opposite change!

Any time you call error, it should already be caught and show up in
the ^error output.  The GDB/MI documentation says that ~"" is for:

`"~" STRING-OUTPUT'
     The console output stream contains text that should be displayed
     in the CLI console window.  It contains the textual responses to
     CLI commands.

> Just as you say if the "frontend wants to display this error to the user in
> the console, it can do so anyway" isn't it equally true that if it doesn't want
> to display this error, it can choose not to so?

Yes, but unlike a formatted MI response, the front end doesn't know
what a random bit of ~"output" is.  It might be a notification, like a
new thread, or an error message, or...

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list