Minor fixes for the Python GDB plugins
cover Minor fixes for the Python GDB plugins
In attempting to use the Python GDB plugins a couple of problems were encountered.
David Edmondson (2):
scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex scripts/qemu-gdb/timers.py: the 'last' attribute is no more
scripts/qemugdb/mtree.py | 2 +- scripts/qemugdb/timers.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/2 scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex
When parsing QEMU's native Int128 type, do not attempt to convert from hexadecimal.
--- scripts/qemugdb/mtree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/qemugdb/mtree.py +1 -1
@@ -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'''
Signature · 1 line
2.34.1
Re: [PATCH 1/2] scripts/qemu-gdb/mtree.py: Int128 are decimal rather than hex
Ping?
Quoted 14 lines · David Edmondson
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 <[email protected]>--- scripts/qemugdb/mtree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/qemugdb/mtree.py +0
-0
scripts/qemugdb/mtree.py def int128(p): · line 31
Quoted 8 lines
scripts/qemugdb/mtree.py +1
-1@@ -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'''
dme.
Signature · 1 line
The band is just fantastic, that is really what I think.
PATCH 2/2 scripts/qemu-gdb/timers.py: the 'last' attribute is no more
In reply to David EdmondsonThe 'last' member of QEMUClock was removed some time ago, but the python gdb helper did not notice.
--- scripts/qemugdb/timers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
scripts/qemugdb/timers.py +2 -3
@@ -37,10 +37,9 @@ def dump_timers(self, timer): def process_timerlist(self, tlist, ttype): gdb.write("Processing %s timers\n" % (ttype)) - gdb.write(" clock %s is enabled:%s, last:%s\n" % ( + gdb.write(" clock %s is enabled:%s\n" % ( tlist['clock']['type'], - tlist['clock']['enabled'], - tlist['clock']['last'])) + tlist['clock']['enabled'])) if int(tlist['active_timers']) > 0: self.dump_timers(tlist['active_timers'])
Signature · 1 line
2.34.1
Re: [PATCH 2/2] scripts/qemu-gdb/timers.py: the 'last' attribute is no more
Quoted 8 lines · David Edmondson
The 'last' member of QEMUClock was removed some time ago, but the python gdb helper did not notice.
Fixes 3c2d4c8aa6 ("timer: last, remove last bits of last")Signed-off-by David Edmondson <[email protected]>--- scripts/qemugdb/timers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Ouch, 2+ years.