[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/7] dump-guest-memory.py: fix No symbol "vmcoreinfo_
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 4/7] dump-guest-memory.py: fix No symbol "vmcoreinfo_find" |
Date: |
Fri, 1 Dec 2017 19:08:47 +0200 |
From: Marc-André Lureau <address@hidden>
When qemu is compiled without debug, the dump gdb python script can fail with:
Error occurred in Python command: No symbol "vmcoreinfo_find" in current
context.
Because vmcoreinfo_find() is inlined and not exported.
Use the underlying object_resolve_path_type() to get the instance instead.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
scripts/dump-guest-memory.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
index 69dd5ef..1af26c1 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)
--
MST
- [Qemu-devel] [PULL 0/7] pc, pci, virtio: fixes for rc3, Michael S. Tsirkin, 2017/12/01
- [Qemu-devel] [PULL 1/7] i386/msi: Correct mask of destination ID in MSI address, Michael S. Tsirkin, 2017/12/01
- [Qemu-devel] [PULL 2/7] virtio: Add queue interface to restore avail index from vring used index, Michael S. Tsirkin, 2017/12/01
- [Qemu-devel] [PULL 3/7] vhost: restore avail index from vring used index on disconnection, Michael S. Tsirkin, 2017/12/01
- [Qemu-devel] [PULL 4/7] dump-guest-memory.py: fix No symbol "vmcoreinfo_find",
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 5/7] vhost: fix error check in vhost_verify_ring_mappings(), Michael S. Tsirkin, 2017/12/01
- [Qemu-devel] [PULL 6/7] virtio: check VirtQueue Vring object is set, Michael S. Tsirkin, 2017/12/01
- [Qemu-devel] [PULL 7/7] pc: fix crash on attempted cpu unplug, Michael S. Tsirkin, 2017/12/01
- Re: [Qemu-devel] [PULL 0/7] pc, pci, virtio: fixes for rc3, Peter Maydell, 2017/12/01
- Re: [Qemu-devel] [PULL 0/7] pc, pci, virtio: fixes for rc3, Michael S. Tsirkin, 2017/12/02
- Re: [Qemu-devel] [PULL 0/7] pc, pci, virtio: fixes for rc3, Peter Maydell, 2017/12/04
- Re: [Qemu-devel] [PULL 0/7] pc, pci, virtio: fixes for rc3, Peter Maydell, 2017/12/04
- Re: [Qemu-devel] [PULL 0/7] pc, pci, virtio: fixes for rc3, Michael S. Tsirkin, 2017/12/04