From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24840 invoked by alias); 29 Jun 2008 17:51:55 -0000 Received: (qmail 24832 invoked by uid 22791); 29 Jun 2008 17:51:55 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout6.012.net.il (HELO mtaout6.012.net.il) (84.95.2.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 29 Jun 2008 17:51:10 +0000 Received: from HOME-C4E4A596F7 ([80.230.31.196]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K3800EGKKWN3MG0@i-mtaout6.012.net.il> for gdb-patches@sources.redhat.com; Sun, 29 Jun 2008 21:05:11 +0300 (IDT) Date: Sun, 29 Jun 2008 20:15:00 -0000 From: Eli Zaretskii Subject: Re: [MI non-stop 04/11] Implement --thread and --frame. In-reply-to: <200806291005.14181.vladimir@codesourcery.com> X-012-Sender: halo1@inter.net.il To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Reply-to: Eli Zaretskii Message-id: References: <200806282044.14246.vladimir@codesourcery.com> <200806291005.14181.vladimir@codesourcery.com> 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/msg00581.txt.bz2 > From: Vladimir Prus > Date: Sun, 29 Jun 2008 10:05:14 +0400 > Cc: gdb-patches@sources.redhat.com > > > > >> + 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. > > > > Why would it be wrong? > > It will give you 9, here. Well, I hope you trust that I knew this. > > > >> + 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? > > > > I dunno, does the MI spec mandate decimal here? If it does, then my > > comment is hereby withdrawn. > > The spec does not mandate decimal, or allow hex -- yet. Other commands that > take numbers are also silent, however the code appears to use decimal. For > example, -stack-list-args and friends use atoi -- which is 10-base. Then perhaps we should document that it must be decimal.