Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Import strchrnul from gnulib and use it
Date: Thu, 28 Jan 2016 12:00:00 -0000	[thread overview]
Message-ID: <56AA02D8.8030104@redhat.com> (raw)
In-Reply-To: <1453928650-30750-1-git-send-email-simon.marchi@ericsson.com>

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


  parent reply	other threads:[~2016-01-28 12:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 21:04 Simon Marchi
2016-01-27 21:43 ` Sergio Durigan Junior
2016-01-28 12:00 ` Pedro Alves [this message]
2016-01-28 15:34   ` Simon Marchi
2016-01-28 16:00 ` Yao Qi
2016-01-28 16:16   ` Simon Marchi
2016-01-28 17:44     ` Yao Qi
2016-01-28 18:51       ` Simon Marchi
2016-01-30 18:01         ` Matt Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56AA02D8.8030104@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox