From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuJ6d-0003Yt-Ak for qemu-devel@nongnu.org; Mon, 18 May 2015 07:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuJ6Z-0008Df-6d for qemu-devel@nongnu.org; Mon, 18 May 2015 07:21:11 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:36782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuJ6Y-0008DG-WE for qemu-devel@nongnu.org; Mon, 18 May 2015 07:21:07 -0400 Received: by wgbgq6 with SMTP id gq6so9989227wgb.3 for ; Mon, 18 May 2015 04:21:06 -0700 (PDT) From: hw.claudio@gmail.com Date: Mon, 18 May 2015 13:22:16 +0200 Message-Id: <1431948138-14238-1-git-send-email-hw.claudio@gmail.com> Subject: [Qemu-devel] [RFC v6 0/2] monitor: add memory search commands s, sp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino , Paolo Bonzini Cc: Claudio Fontana , Peter Maydell , Gonglei , qemu-devel@nongnu.org From: Claudio Fontana This is the latest iteration of the memory search patch, including a trivial replacement for the memmem function for systems which don't provide one (notably Windows). It detects the presence of memmem in configure and sets CONFIG_MEMMEM, providing a trivial implementation for the !CONFIG_MEMMEM case. The new code is MIT licensed, following usage of other files in the same directory dealing with replacement functions (osdep, oslib, getauxval etc), and to maximize reusability. I have tested this in both CONFIG_MEMMEM defined/undefined scenarios, but more feedback and testing is welcome of course. changes from v5: dropped the import from gnulib and implemented a trivial replacement. 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 | 62 +++++++++++++++++++++++ 6 files changed, 250 insertions(+) create mode 100644 util/memmem.c -- 1.8.5.3