From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYuEf-0002IP-QK for qemu-devel@nongnu.org; Mon, 07 Sep 2015 07:05:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYu9u-0002Ho-La for qemu-devel@nongnu.org; Mon, 07 Sep 2015 07:00:26 -0400 References: <1440666378-3152-1-git-send-email-mst@redhat.com> From: Paolo Bonzini Message-ID: <55ED6E40.2090907@redhat.com> Date: Mon, 7 Sep 2015 13:00:16 +0200 MIME-Version: 1.0 In-Reply-To: <1440666378-3152-1-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scripts/dump-guest-memory.py: fix after RAMBlock change List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Mike Day , Fam Zheng , qemu-stable@nongnu.org On 27/08/2015 11:06, Michael S. Tsirkin wrote: > commit 9b8424d5735278ca382f11adc7c63072b632ab83 > "exec: split length -> used_length/max_length" > changed field names in struct RAMBlock > > It turns out that scripts/dump-guest-memory.py was > poking at this field, update it accordingly. > > Cc: qemu-stable@nongnu.org > Cc: Paolo Bonzini > Signed-off-by: Michael S. Tsirkin > --- > scripts/dump-guest-memory.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py > index dc8e44a..08796ff 100644 > --- a/scripts/dump-guest-memory.py > +++ b/scripts/dump-guest-memory.py > @@ -118,7 +118,7 @@ shape and this command should mostly work.""" > def qemu_get_ram_block(self, ram_addr): > ram_blocks = gdb.parse_and_eval("ram_list.blocks") > for block in self.qlist_foreach(ram_blocks, "next"): > - if (ram_addr - block["offset"] < block["length"]): > + if (ram_addr - block["offset"] < block["used_length"]): > return block > raise gdb.GdbError("Bad ram offset %x" % ram_addr) > > Thanks, queued for my next pull request. Paolo