From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 724 invoked by alias); 28 Jan 2016 12:00:37 -0000 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 Received: (qmail 714 invoked by uid 89); 28 Jan 2016 12:00:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1566, H*MI:sk:1453928 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Jan 2016 12:00:26 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id C8D563BEB5; Thu, 28 Jan 2016 12:00:25 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0SC0Oig009292; Thu, 28 Jan 2016 07:00:25 -0500 Message-ID: <56AA02D8.8030104@redhat.com> Date: Thu, 28 Jan 2016 12:00:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] Import strchrnul from gnulib and use it References: <1453928650-30750-1-git-send-email-simon.marchi@ericsson.com> In-Reply-To: <1453928650-30750-1-git-send-email-simon.marchi@ericsson.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00693.txt.bz2 On 01/27/2016 09:04 PM, Simon Marchi wrote: > For a forthcoming patch, I need a "skip_to_colon" function. I noticed > there are two skip_to_semicolon (one in gdb and one in gdbserver). I > thought we could put it in common/, and generalize it for any character. > It turns out that the strchrnul function does exactly that. I imported > the corresponding module from gnulib, for those systems that do not have > it. > > There are probably more places where this function can be used instead > of doing the work by hand (I am looking at > remote-utils.c::look_up_one_symbol). > > gdb/ChangeLog: > > * remote.c (skip_to_semicolon): Remove. > (remote_parse_stop_reply): Use strchrnul instead of > skip_to_semicolon. > * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add > strchrnul. > * gnulib/aclocal.m4: Regenerate. > * gnulib/config.in: Regenerate. > * gnulib/configure: Regenerate. > * gnulib/import/Makefile.am: Regenerate. > * gnulib/import/Makefile.in: Regenerate. > * gnulib/import/m4/gnulib-cache.m4: Regenerate. > * gnulib/import/m4/gnulib-comp.m4: Regenerate. > * gnulib/import/m4/rawmemchr.m4: New file. > * gnulib/import/m4/strchrnul.m4: New file. > * gnulib/import/rawmemchr.c: New file. > * gnulib/import/rawmemchr.valgrind: New file. > * gnulib/import/strchrnul.c: New file. > * gnulib/import/strchrnul.valgrind: New file. > > gdb/gdbserver/ChangeLog: > > * server.c (skip_to_semicolon): Remove. > (process_point_options): Use strchrnul instead of > skip_to_semicolon. OK. Thanks, Pedro Alves