This is the mail archive of the gdb-patches@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: cleanup mi error message handling


Daniel Jacobowitz wrote:

> On Tue, Mar 25, 2008 at 01:28:26PM +1200, Nick Roberts wrote:
>>  > > 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...
>> 
>> Errors aren't CONSOLE-STREAM-OUTPUT but LOG-STREAM-OUTPUT and are prefixed
>> with `&' not `~':
>> 
>> &"The program is not being run.\n"
>> ^error,msg="The program is not being run."
>> (gdb)
>> 
>> =thread-created,id=2
>> ~"[New Thread 0xb7568b90 (LWP 19810)]\n"
> 
> Whoops, you're right.  Sorry for confusing the issue.
> 
> `"&" STRING-OUTPUT'
>      The log stream contains debugging messages being produced by GDB's
>      internals.
> 
> I still think that means we shouldn't be producing them for
> errors.

I agree. What happens now is that on errors, Eclipse shows the error message
in red. Good, however since it does not show the MI commands user will
know what something is wrong, but won't have any clue why. If the point is
just to show to the user that some error has happened, then the ^error is pretty
sufficient. And if we enable logging of MI commands, user can see the
information even if nothing goes to "&" channel.

So I'd agree that removing those error messages is good. I plan to review
the patch in detail next week.

- Volodya

 



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