From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12394 invoked by alias); 29 Mar 2008 14:22:36 -0000 Received: (qmail 12385 invoked by uid 22791); 29 Mar 2008 14:22:35 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 29 Mar 2008 14:22:16 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jfbwi-0003We-Pu for gdb-patches@sources.redhat.com; Sat, 29 Mar 2008 14:22:12 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2008 14:22:12 +0000 Received: from ghost by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2008 14:22:12 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: cleanup mi error message handling Date: Sat, 29 Mar 2008 14:22:00 -0000 Message-ID: References: <200803241830.11759.pedro@codesourcery.com> <18408.9553.683746.929167@kahikatea.snap.net.nz> <20080324223840.GA20307@caradoc.them.org> <18408.15132.721049.31408@kahikatea.snap.net.nz> <20080325005941.GA27677@caradoc.them.org> <18408.21818.695835.725321@kahikatea.snap.net.nz> <20080325021214.GA31594@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.5 X-IsSubscribed: yes 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/msg00484.txt.bz2 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