summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-08-27 12:06:23 +0300
committerMichael Roth <mdroth@linux.vnet.ibm.com>2015-10-17 23:17:43 -0500
commit267bc474382f55eca082065a0f290695a5aa5242 (patch)
tree7eaed71b8d237fc249e4ea1dc87a3187481ba90b
parent955ff148de252b2fec92a1beef7f91c0987bb713 (diff)
downloadqemu-267bc474382f55eca082065a0f290695a5aa5242.tar.gz
scripts/dump-guest-memory.py: fix after RAMBlock change
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 <pbonzini@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <1440666378-3152-1-git-send-email-mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 0c71d41e2aa3c7356500ae624166f3bb8c201aee) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--scripts/dump-guest-memory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
index dc8e44acf8..08796fff8c 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)