qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v4] monitor: add memory search commands s, sp


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC v4] monitor: add memory search commands s, sp
Date: Wed, 13 May 2015 17:19:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]