From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10992 invoked by alias); 16 Jan 2012 16:39:46 -0000 Received: (qmail 10854 invoked by uid 22791); 16 Jan 2012 16:39:44 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jan 2012 16:39:26 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0GGdP8d012423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 16 Jan 2012 11:39:25 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0GGdOpn031035; Mon, 16 Jan 2012 11:39:25 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id q0GGdM1E014276; Mon, 16 Jan 2012 11:39:23 -0500 From: Tom Tromey To: Sergio Durigan Junior Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Make static tracepoint with markers more OO References: Date: Mon, 16 Jan 2012 17:03:00 -0000 In-Reply-To: (Sergio Durigan Junior's message of "Fri, 13 Jan 2012 20:18:28 -0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-01/txt/msg00548.txt.bz2 >>>>> "Sergio" == Sergio Durigan Junior writes: Sergio> + if (arg && strncmp (arg, "-m", 2) == 0 && isblank (arg[2])) Tom> I am not sure that isblank is ok to use. gdb doesn't use it anywhere Tom> else. I suggest just using the original check. Sergio> Yeah, well, the original check is for space and tab, and isblank does Sergio> exactly that. I am not sure what is the deal about using it, but I Sergio> removed as suggested. I believe isblank was added in C99, but gdb generally uses C90. These days, you can pretty much search for "gnulib $FUNCTION" and find all the information you need: http://www.gnu.org/software/gnulib/manual/html_node/isblank.html I wouldn't mind us upgrading, or using more of gnulib, or both. Sergio> The attached patch fixes all the issues pointed out by you and Pedro. I Sergio> have also tested this on my machine using UST probes, and on testfarm. Sergio> No regressions were found. Is it OK to apply? Sergio> + if (arg && strncmp (arg, "-m", 2) == 0 && (isspace (arg[2]) Sergio> + || arg[2] == '\t')) isspace also looks for \t, so please remove the || clause. I have no further comments, but I would rather Pedro give the final OK on this. Tom