From: deller@kernel.org
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: Helge Deller <deller@gmx.de>
Subject: [PULL 2/2] disas/hppa: Show hexcode of instruction along with disassembly
Date: Fri, 17 Nov 2023 21:05:21 +0100 [thread overview]
Message-ID: <20231117200521.417330-3-deller@kernel.org> (raw)
In-Reply-To: <20231117200521.417330-1-deller@kernel.org>
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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
disas/hppa.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/disas/hppa.c b/disas/hppa.c
index dcf9a47f34..cce4f4aa37 100644
--- a/disas/hppa.c
+++ b/disas/hppa.c
@@ -1968,6 +1968,10 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
insn = bfd_getb32 (buffer);
+ info->fprintf_func(info->stream, " %02x %02x %02x %02x ",
+ (insn >> 24) & 0xff, (insn >> 16) & 0xff,
+ (insn >> 8) & 0xff, insn & 0xff);
+
for (i = 0; i < NUMOPCODES; ++i)
{
const struct pa_opcode *opcode = &pa_opcodes[i];
@@ -2826,6 +2830,6 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
return sizeof (insn);
}
}
- (*info->fprintf_func) (info->stream, "#%8x", insn);
+ info->fprintf_func(info->stream, "<unknown>");
return sizeof (insn);
}
--
2.41.0
next prev parent reply other threads:[~2023-11-17 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 20:05 [PULL 0/2] hppa64 fixes deller
2023-11-17 20:05 ` [PULL 1/2] target/hppa: Fix 64-bit SHRPD instruction deller
2023-11-17 20:05 ` deller [this message]
2023-11-20 14:39 ` [PULL 0/2] hppa64 fixes Stefan Hajnoczi
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=20231117200521.417330-3-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).