aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/dump-guest-memory.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
index 69dd5efadf..1af26c1a45 100644
--- a/scripts/dump-guest-memory.py
+++ b/scripts/dump-guest-memory.py
@@ -546,13 +546,15 @@ shape and this command should mostly work."""
return None
def add_vmcoreinfo(self):
- if not gdb.parse_and_eval("vmcoreinfo_find()") \
- or not gdb.parse_and_eval("vmcoreinfo_find()->has_vmcoreinfo"):
+ vmci = '(VMCoreInfoState *)' + \
+ 'object_resolve_path_type("", "vmcoreinfo", 0)'
+ if not gdb.parse_and_eval("%s" % vmci) \
+ or not gdb.parse_and_eval("(%s)->has_vmcoreinfo" % vmci):
return
- fmt = gdb.parse_and_eval("vmcoreinfo_find()->vmcoreinfo.guest_format")
- addr = gdb.parse_and_eval("vmcoreinfo_find()->vmcoreinfo.paddr")
- size = gdb.parse_and_eval("vmcoreinfo_find()->vmcoreinfo.size")
+ fmt = gdb.parse_and_eval("(%s)->vmcoreinfo.guest_format" % vmci)
+ addr = gdb.parse_and_eval("(%s)->vmcoreinfo.paddr" % vmci)
+ size = gdb.parse_and_eval("(%s)->vmcoreinfo.size" % vmci)
fmt = le16_to_cpu(fmt)
addr = le64_to_cpu(addr)