qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] disas/hppa: Show hexcode of instruction along with disassemb


From: deller
Subject: [PATCH 2/2] disas/hppa: Show hexcode of instruction along with disassembly
Date: Fri, 17 Nov 2023 11:45:51 +0100

From: Helge Deller <deller@gmx.de>

On hppa many instructions can be expressed by different bytecodes.
To be able to debug qemu translation bugs it's therefore necessary to see the
currently executed byte codes without the need to lookup the sequence without
the full executable.
With this patch the instruction byte code is shown beside the disassembly.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 disas/hppa.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/disas/hppa.c b/disas/hppa.c
index dcf9a47f34..38fc05acc4 100644
--- a/disas/hppa.c
+++ b/disas/hppa.c
@@ -1979,6 +1979,9 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
          if (opcode->arch == pa20w)
            continue;
 #endif
+         (*info->fprintf_func) (info->stream, " %02x %02x %02x %02x   ",
+                (insn >> 24) & 0xff, (insn >> 16) & 0xff,
+                (insn >>  8) & 0xff, insn & 0xff);
          (*info->fprintf_func) (info->stream, "%s", opcode->name);
 
          if (!strchr ("cfCY?-+nHNZFIuv{", opcode->args[0]))
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]