From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsYRq-0000bg-Nu for qemu-devel@nongnu.org; Wed, 13 May 2015 11:19:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsYRm-00067k-T3 for qemu-devel@nongnu.org; Wed, 13 May 2015 11:19:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsYRm-00067V-N3 for qemu-devel@nongnu.org; Wed, 13 May 2015 11:19:46 -0400 Message-ID: <55536B8D.8090303@redhat.com> Date: Wed, 13 May 2015 17:19:41 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1429879188-28888-1-git-send-email-hw.claudio@gmail.com> <20150511101632.7b93988e@redhat.com> <55521640.6010101@huawei.com> In-Reply-To: <55521640.6010101@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v4] monitor: add memory search commands s, sp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Claudio Fontana , Luiz Capitulino , hw.claudio@gmail.com Cc: Peter Maydell , Gonglei , qemu-devel@nongnu.org On 12/05/2015 17:03, Claudio Fontana wrote: > I see, will take some time to figure out I think, due to my lack of familiarity with the Windows compilation environment. > > Incidentally, if somebody knows of memmem equivalents in the Windows API, or how function replacements are usually handled, please let me know. > > I guess we could add a replacement function in util/ to compile #ifdef _WIN32? Yes, you can use $(CONFIG_WIN32) in util/Makefile.objs. It doesn't have to be fancy, a simple O(n^2) search would do. Later we could use Boyer-Moore or some other optimization. > Basically it would be a duplicate of the work already done in gnulib... Yes. The good thing is that it would be easy to test without a cross-compiler, since symbols in an executable override symbols in glibc. > are all other supported targets ok with using the GNU function memmem of string.h ? Until they complain, they are... Paolo