From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8829 invoked by alias); 24 Mar 2008 22:39:03 -0000 Received: (qmail 8818 invoked by uid 22791); 24 Mar 2008 22:39:03 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 24 Mar 2008 22:38:43 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id A2B26983C6; Mon, 24 Mar 2008 22:38:41 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 4A7579810C; Mon, 24 Mar 2008 22:38:41 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JdvJQ-0005MP-CH; Mon, 24 Mar 2008 18:38:40 -0400 Date: Mon, 24 Mar 2008 22:39:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: cleanup mi error message handling Message-ID: <20080324223840.GA20307@caradoc.them.org> Mail-Followup-To: Nick Roberts , Pedro Alves , gdb-patches@sourceware.org References: <200803241830.11759.pedro@codesourcery.com> <18408.9553.683746.929167@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18408.9553.683746.929167@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.17 (2007-12-11) 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/msg00369.txt.bz2 On Tue, Mar 25, 2008 at 10:04:01AM +1200, Nick Roberts wrote: > I think sometimes errors are just needed when debugging the frontend, e.g., > > -thread-select > ^error,msg="mi_cmd_thread_select: USAGE: threadnum." > (gdb) > > where one error message is sufficient. Here I think Gdb is trying to mimic > perror by giving the name of the C procedure, but I think it's not desirable as > this gets printed due to a frontend error, not a Gdb error. So I would like to > see: > > -thread-select > ^error,msg="USAGE: threadnum." > (gdb) I agree. > 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. Could you explain why the duplication here is good? It seems to me that if the front end wants to display this error to the user in the console, it can do so anyway, but it shouldn't have to. Maybe this requires a version bump, I don't know. In Eclipse, this duplication leads to a bunch of error messages that pop up in the console pane which don't come from anything the user did. It's very confusing. -- Daniel Jacobowitz CodeSourcery