From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2653 invoked by alias); 28 Jun 2008 17:35:30 -0000 Received: (qmail 2645 invoked by uid 22791); 28 Jun 2008 17:35:30 -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, 28 Jun 2008 17:35:06 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KCeKE-0000or-5E for gdb-patches@sources.redhat.com; Sat, 28 Jun 2008 17:35:02 +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, 28 Jun 2008 17:35:02 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Jun 2008 17:35:02 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [MI non-stop 04/11] Implement --thread and --frame. Date: Sat, 28 Jun 2008 18:00:00 -0000 Message-ID: References: <200806282044.14246.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 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-06/txt/msg00555.txt.bz2 Eli Zaretskii wrote: >> From: Vladimir Prus >> Date: Sat, 28 Jun 2008 20:44:14 +0400 >> >> >> + if (parse->frame != -1 && !parse->thread == -1) >> + error ("Cannot specify --frame without --thread"); > > Why is this error message not in _(), while all the rest are? > > Btw, do we at all want error messages issued by MI commands > translated? I think we don't, but I'm not sure. > MI commands are invoked by a program, so error messages > we generate should be understandable by a program, which probably > means they should not be translated. It's a bit questionable. For example, the error you mention above is clearly a bug in frontend. Presenting a translated version of that message to the user is essentially pointless. On the other hand, "Thread is running", or "Memory not accessible" messages can be helpful for users. Do we need two error messages, maybe? >> + if (strncmp (chp, "--thread", 8) == 0) > > Please, let's not use literal constants in this context, let's use > sizeof instead. sizeof? For all I know, sizeof("--thread") will be wrong here. > >> + parse->frame = strtol (chp, &chp, 10); > > Do we really want to disallow non-decimal numbers here? What about > hex frame numbers? Why would frontend want to specify frame level in hex? - Volodya