qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: hw.claudio@gmail.com
To: Luiz Capitulino <lcapitulino@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Gonglei <arei.gonglei@huawei.com>,
	Claudio Fontana <claudio.fontana@huawei.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC v5 0/2] monitor: add memory search commands s, sp
Date: Fri, 15 May 2015 14:25:23 +0200	[thread overview]
Message-ID: <1431692725-27656-1-git-send-email-hw.claudio@gmail.com> (raw)

From: Claudio Fontana <claudio.fontana@huawei.com>

Hello,

I went ahead and tried to build the general solution for replacing
memmem on systems which don't provide one (notably Windows),
detecting the presence of memmem in configure and setting CONFIG_MEMMEM,
and providing an implementation (from gnulib) for the !CONFIG_MEMMEM case.

The code imported is GPLv2 in the "or later" form, which I have seen used
in the util library already.

I have tested this in both CONFIG_MEMMEM defined/undefined scenarios,
but more feedback and testing is welcome of course.

changes from v4:
made into a series of two patches.
Introduced a memmem replacement function (import from gnulib)
and detection code in configure.

changes from v3:
initialize pointer variable to NULL to finally get rid of spurious warning

changes from v2:
move code to try to address spurious warning

changes from v1:
make checkpatch happy by adding braces here and there.

Claudio Fontana (2):
  util: add memmem replacement function
  monitor: add memory search commands s, sp

 configure            |  15 ++
 hmp-commands.hx      |  28 ++++
 include/qemu/osdep.h |   4 +
 monitor.c            | 140 ++++++++++++++++
 util/Makefile.objs   |   1 +
 util/memmem.c        |  73 +++++++++
 util/str-two-way.h   | 452 +++++++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 713 insertions(+)
 create mode 100644 util/memmem.c
 create mode 100644 util/str-two-way.h

-- 
1.8.5.3

             reply	other threads:[~2015-05-15 12:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 12:25 hw.claudio [this message]
2015-05-15 12:25 ` [Qemu-devel] [RFC v5 1/2] util: add memmem replacement function hw.claudio
2015-05-15 13:57   ` Claudio Fontana
2015-05-15 14:12     ` Paolo Bonzini
2015-05-15 14:56       ` Eric Blake
2015-05-15 15:13         ` Claudio Fontana
2015-05-15 16:01           ` Eric Blake
2015-05-18  8:36             ` Claudio Fontana
2015-05-15 12:25 ` [Qemu-devel] [RFC v5 2/2] monitor: add memory search commands s, sp hw.claudio

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=1431692725-27656-1-git-send-email-hw.claudio@gmail.com \
    --to=hw.claudio@gmail.com \
    --cc=arei.gonglei@huawei.com \
    --cc=claudio.fontana@huawei.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).