From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXWWS-0002zi-9y for qemu-devel@nongnu.org; Mon, 16 Mar 2015 11:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXWWN-0004aK-Lw for qemu-devel@nongnu.org; Mon, 16 Mar 2015 11:01:40 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:36488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXWWN-0004ZT-Fz for qemu-devel@nongnu.org; Mon, 16 Mar 2015 11:01:35 -0400 Received: by wibg7 with SMTP id g7so40012421wib.1 for ; Mon, 16 Mar 2015 08:01:34 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5506F04A.3040705@redhat.com> Date: Mon, 16 Mar 2015 16:01:30 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1426501911-1402-1-git-send-email-hw.claudio@gmail.com> <5506EC8B.1020300@redhat.com> In-Reply-To: <5506EC8B.1020300@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3] monitor: add memory search commands s, sp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , hw.claudio@gmail.com, Luiz Capitulino Cc: Peter Maydell , Gonglei , Claudio Fontana , qemu-devel@nongnu.org On 16/03/2015 15:45, Eric Blake wrote: > On 03/16/2015 04:31 AM, hw.claudio@gmail.com wrote: >> From: Claudio Fontana >> >> usage is similar to the commands x, xp. >> >> Example with string: looking for "ELF" header in memory: >> >> (qemu) s/1000000cb 0x40001000 "ELF" searching memory area >> [0000000040001000-00000000400f5240] 0000000040090001 (qemu) x/20b >> 0x40090000 0000000040090000: '\x7f' 'E' 'L' 'F' '\x02' '\x01' >> '\x01' '\x03' 0000000040090008: '\x00' '\x00' '\x00' '\x00' >> '\x00' '\x00' '\x00' '\x00' 0000000040090010: '\x02' '\x00' >> '\xb7' '\x00' >> >> Example with value: looking for 64bit variable value 0x990088 >> >> (qemu) s/1000000xg 0xffff900042000000 0x990088 searching memory >> area [ffff900042000000-ffff9000427a1200] ffff9000424b3000 >> ffff9000424c1000 >> >> Signed-off-by: Claudio Fontana --- >> hmp-commands.hx | 28 ++++++++++++ monitor.c | 140 >> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files >> changed, 168 insertions(+) >> >> Hello, looking for some comments on whether the addition of this >> command is welcome, and whether the syntax chosen is acceptable, >> or how it can made better. > > Do you want to provide a QMP counterpart? In general, we are > reluctant to add new HMP functionality that cannot also be accessed > via QMP. I think this is okay for a debugging command. x and xp do not have an QMP equivalent either. Paolo