All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC v5 0/2] monitor: add memory search commands s, sp
@ 2015-05-15 12:25 hw.claudio
  2015-05-15 12:25 ` [Qemu-devel] [RFC v5 1/2] util: add memmem replacement function hw.claudio
  2015-05-15 12:25 ` [Qemu-devel] [RFC v5 2/2] monitor: add memory search commands s, sp hw.claudio
  0 siblings, 2 replies; 9+ messages in thread
From: hw.claudio @ 2015-05-15 12:25 UTC (permalink / raw)
  To: Luiz Capitulino, Paolo Bonzini
  Cc: Peter Maydell, Gonglei, Claudio Fontana, qemu-devel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-05-18  8:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 12:25 [Qemu-devel] [RFC v5 0/2] monitor: add memory search commands s, sp hw.claudio
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.