aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-03-31 12:43:27 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-03-31 12:43:27 +0100
commit37c4a85cd256a51c5f58ee7e531f25f0e89b2c87 (patch)
tree7e44f6189afc6f37ba713ac133cd52bae38c40ef
parente7d54416cf7a30928a455ddf86ca57d766e9a902 (diff)
parentfd5d23babf9838c1b099a9e8020e778aac0ebb4d (diff)
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170331' into staging
HMP pull (one bugfix) # gpg: Signature made Fri 31 Mar 2017 11:57:17 BST # gpg: using RSA key 0x0516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-hmp-20170331: hmp: fix "dump-quest-memory" segfault Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/i386/arch_dump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/i386/arch_dump.c b/target/i386/arch_dump.c
index 5a2e4be5d0..fe0aa36932 100644
--- a/target/i386/arch_dump.c
+++ b/target/i386/arch_dump.c
@@ -391,8 +391,7 @@ int cpu_get_dump_info(ArchDumpInfo *info,
#ifdef TARGET_X86_64
X86CPU *first_x86_cpu = X86_CPU(first_cpu);
-
- lma = !!(first_x86_cpu->env.hflags & HF_LMA_MASK);
+ lma = first_cpu && (first_x86_cpu->env.hflags & HF_LMA_MASK);
#endif
if (lma) {