summary refs log tree commit diff stats
path: root/hw/misc/vmcoreinfo.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-01-08 21:02:07 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-01-08 21:02:07 +0000
commit4bd797af6f5bc9f7114030695716d199dceafa6e (patch)
tree38d9efaf4cc11556df2292c3ffdcef0e0b18aa34 /hw/misc/vmcoreinfo.c
parentd2d0852271ca2d0a4df4c31312289a816266a0aa (diff)
parentc3b1642b9b6b3ba4314d6be3be509d396372cfd5 (diff)
downloadfocaccia-qemu-4bd797af6f5bc9f7114030695716d199dceafa6e.tar.gz
focaccia-qemu-4bd797af6f5bc9f7114030695716d199dceafa6e.zip
Merge remote-tracking branch 'remotes/elmarco/tags/dump-pull-request' into staging
# gpg: Signature made Tue 02 Jan 2018 13:51:26 GMT
# gpg:                using RSA key 0xDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>"
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>"
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* remotes/elmarco/tags/dump-pull-request:
  dump-guest-memory.py: fix "You can't do that without a process to debug"
  dump: fix note_name_equal()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc/vmcoreinfo.c')
-rw-r--r--hw/misc/vmcoreinfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c
index 31db57ab44..a2805527cb 100644
--- a/hw/misc/vmcoreinfo.c
+++ b/hw/misc/vmcoreinfo.c
@@ -35,6 +35,8 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **errp)
 {
     VMCoreInfoState *s = VMCOREINFO(dev);
     FWCfgState *fw_cfg = fw_cfg_find();
+    /* for gdb script dump-guest-memory.py */
+    static VMCoreInfoState * volatile vmcoreinfo_state G_GNUC_UNUSED;
 
     /* Given that this function is executing, there is at least one VMCOREINFO
      * device. Check if there are several.
@@ -56,6 +58,7 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **errp)
                              &s->vmcoreinfo, sizeof(s->vmcoreinfo), false);
 
     qemu_register_reset(vmcoreinfo_reset, dev);
+    vmcoreinfo_state = s;
 }
 
 static const VMStateDescription vmstate_vmcoreinfo = {