From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12182 invoked by alias); 26 Mar 2010 12:40:54 -0000 Received: (qmail 12170 invoked by uid 22791); 26 Mar 2010 12:40:53 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Mar 2010 12:40:50 +0000 Received: (qmail 4397 invoked from network); 26 Mar 2010 12:40:48 -0000 Received: from unknown (HELO macbook-2.local) (stan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Mar 2010 12:40:48 -0000 Message-ID: <4BACAB4A.2060005@codesourcery.com> Date: Fri, 26 Mar 2010 12:40:00 -0000 From: Stan Shebs User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: Pedro Alves CC: gdb-patches@sourceware.org, Stan Shebs Subject: Re: [PATCH/commit] Handle errors in tracepoint target agent References: <4BAC1426.5050003@codesourcery.com> <201003261113.40865.pedro@codesourcery.com> In-Reply-To: <201003261113.40865.pedro@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: 2010-03/txt/msg00881.txt.bz2 Pedro Alves wrote: > On Friday 26 March 2010 01:55:50, Stan Shebs wrote: > >> For the record, here's what I ended up committing. >> > > (For the record, if a patch ends up different to how it was > being discussed, a chance for commenting before checking in > would be really appreciated.) > It seemed uncontroversial, but I guess not. :-) > + for (p = p1; p < p2; p++) > + if (!((*p >= '0' && *p <= '9') > + || (*p >= 'a' && *p <= 'f') > + || (*p >= 'A' && *p <= 'F'))) > + break; > Oh triple yuck. Let's just make a new utility function - an ishex-type test shouldn't be coded more than once, or maybe twice, in a program. > If you really insist in handling this in FSF gdb as well, > then I'd like to merge this patch above to head, otherwise, > I'd rather just remove all the plain string handling from > FSF gdb, and put that patch in our tree only. (I don't > really see the point in carrying that workaround forever in > FSF gdb). > Alright alright. My interest in the subject is now totally exhausted, we'll just do the hex strings here. Stan