From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29399 invoked by alias); 30 Mar 2008 06:06:11 -0000 Received: (qmail 29389 invoked by uid 22791); 30 Mar 2008 06:06:10 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 30 Mar 2008 06:05:51 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.63) (envelope-from ) id 1Jfqfo-0008Rl-Mk for gdb-patches@sources.redhat.com; Sun, 30 Mar 2008 10:05:48 +0400 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Jfqfe-0008RY-SS; Sun, 30 Mar 2008 10:05:34 +0400 From: Vladimir Prus To: Nick Roberts Subject: Re: cleanup mi error message handling Date: Sun, 30 Mar 2008 06:06:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: gdb-patches@sources.redhat.com References: <200803241830.11759.pedro@codesourcery.com> <18415.8302.588187.39111@kahikatea.snap.net.nz> In-Reply-To: <18415.8302.588187.39111@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803301005.39285.ghost@cs.msu.su> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00488.txt.bz2 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