]> git.proxmox.com Git - mirror_qemu.git/commit
dump-guest-memory.py: skip vmcoreinfo section if not available
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 31 Jan 2018 10:37:24 +0000 (11:37 +0100)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 1 Feb 2018 11:13:52 +0000 (12:13 +0100)
commitce6b9e421a9ab45d7e6c97af092a07c049954444
treed8bb892712ee1ec524e6505c1b90e64ec7973fca
parentb05631954d6dfe93340d516660397e2c1a2a5dd6
dump-guest-memory.py: skip vmcoreinfo section if not available

On some architectures, qemu doesn't support vmcoreinfo device,
and dump-guest-memory fails:

(gdb) dump-guest-memory /tmp/vmcore  ppc64-le
guest RAM blocks:
target_start     target_end       host_addr        message count
---------------- ---------------- ---------------- ------- -----
0000000000000000 0000000200000000 00003ffd86980000 added       1
0000200080000000 0000200080800000 00003ffd86170000 added       2
Python Exception <class 'gdb.error'> No symbol "vmcoreinfo_realize" in current context.:
Error occurred in Python command: No symbol "vmcoreinfo_realize" in current context.

Check that vmcoreinfo_realize symbol exists before evaluating an
expression with it.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
scripts/dump-guest-memory.py