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


On Sunday 30 March 2008 09:09:02 Nick Roberts wrote:
>  > > `"&" 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.
> 
> From mi-interp.c:
> 
>   /* Create MI channels */
>   mi->err = mi_console_file_new (raw_stdout, "&", '"');
>   mi->log = mi->err;
> 
> Maybe the documentation is imprecise but it's pretty clear from the code that
> this channel was intended 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.
> 
> Maybe that's a shortcoming of Eclipse.  And if it is a problem then it is
> surely one which an Eclipse developer should raise.

I don't see any possible UI where errors produced from MI commands that
are not shown make any sense.

> 
>  >                                                       If the point is just
>  > to show to the user that some error has happened, then the ^error is pretty
>  > sufficient. 
> 
> I've said why I don't think it's sufficient but I'm not going to repeat myself.

The only thing from you I can find is:

  At other times duplicated error messages are desirable, e.g.,

  -exec-continue 
  ^running
  (gdb) 
  &"The program is not being run.\n"
  ^error,msg="The program is not being run."

  because the first goes to the console for the user to see, the second to
  the frontend to be handled as appropriate.

You still did not say why showing the error message is console is desirable.
If -exec-continue itself is now show in the console, the error message
makes no sense. If -exec-continue is shown, then the error message is not
necessary. Where the flaw in this logic.

> 
>  >            And if we enable logging of MI commands, user can see the
>  > information even if nothing goes to "&" channel.
> 
> And nothing goes to the console.  Same old story.

Sorry, I don't understand what is "old story" and why nothing goes to console.
Both KDevelop and Eclipse will send both MI commands and responses to the console
window if "verbose" mode is enabled.

- Volodya


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