qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Edmondson <david.edmondson@oracle.com>
To: qemu-devel@nongnu.org
Cc: David Edmondson <david.edmondson@oracle.com>
Subject: [PATCH 1/2] scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex
Date: Mon, 21 Feb 2022 16:49:47 +0000	[thread overview]
Message-ID: <20220221164948.2873713-2-david.edmondson@oracle.com> (raw)
In-Reply-To: <20220221164948.2873713-1-david.edmondson@oracle.com>

When parsing QEMU's native Int128 type, do not attempt to convert from
hexadecimal.

Fixes: 8037fa55ac ("scripts/qemugdb/mtree.py: fix up mtree dump")
Signed-off-by: David Edmondson <david.edmondson@oracle.com>
---
 scripts/qemugdb/mtree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/qemugdb/mtree.py b/scripts/qemugdb/mtree.py
index 8fe42c3c12..c1557d44fa 100644
--- a/scripts/qemugdb/mtree.py
+++ b/scripts/qemugdb/mtree.py
@@ -25,7 +25,7 @@ def int128(p):
     if p.type.code == gdb.TYPE_CODE_STRUCT:
         return int(p['lo']) + (int(p['hi']) << 64)
     else:
-        return int(("%s" % p), 16)
+        return int("%s" % p)
 
 class MtreeCommand(gdb.Command):
     '''Display the memory tree hierarchy'''
-- 
2.34.1



  reply	other threads:[~2022-02-21 16:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 16:49 [PATCH 0/2] Minor fixes for the Python GDB plugins David Edmondson
2022-02-21 16:49 ` David Edmondson [this message]
2022-03-29 12:02   ` [PATCH 1/2] scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex David Edmondson
2022-02-21 16:49 ` [PATCH 2/2] scripts/qemu-gdb/timers.py: the 'last' attribute is no more David Edmondson
2022-02-21 17:02   ` Philippe Mathieu-Daudé

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=20220221164948.2873713-2-david.edmondson@oracle.com \
    --to=david.edmondson@oracle.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).