From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: lersek@redhat.com, "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH] scripts/dump-guest-memory.py: fix int128_get64 on recent gcc
Date: Fri, 10 Mar 2017 12:53:31 +0400 [thread overview]
Message-ID: <20170310085331.17916-1-marcandre.lureau@redhat.com> (raw)
The Int128 is no longer a struct, reaching a python exception:
Python Exception <class 'gdb.error'> Attempt to extract a component of a value that is not a (null).:
Replace struct access with a cast to uint64 instead.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1427466
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
scripts/dump-guest-memory.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
index 9956fc036c..bbe1c14ba2 100644
--- a/scripts/dump-guest-memory.py
+++ b/scripts/dump-guest-memory.py
@@ -314,8 +314,10 @@ def get_arch_phdr(endianness, elfclass):
def int128_get64(val):
"""Returns low 64bit part of Int128 struct."""
- assert val["hi"] == 0
- return val["lo"]
+ u64t = gdb.lookup_type('uint64_t').array(2)
+ u64 = val.cast(u64t)
+ assert u64[1] == 0
+ return u64[0]
def qlist_foreach(head, field_str):
--
2.12.0.rc2.3.gc93709801
next reply other threads:[~2017-03-10 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 8:53 Marc-André Lureau [this message]
2017-03-10 9:59 ` [Qemu-devel] [PATCH] scripts/dump-guest-memory.py: fix int128_get64 on recent gcc Paolo Bonzini
2017-03-10 10:54 ` Marc-André Lureau
2017-03-10 10:58 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170310085331.17916-1-marcandre.lureau@redhat.com \
--to=marcandre.lureau@redhat.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).