Skip to content

Commit 2f926bf

Browse files
committed
disas/hppa: Show hexcode of instruction along with disassembly
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>
1 parent a01491a commit 2f926bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

disas/hppa.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,6 +1968,10 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
19681968

19691969
insn = bfd_getb32 (buffer);
19701970

1971+
info->fprintf_func(info->stream, " %02x %02x %02x %02x ",
1972+
(insn >> 24) & 0xff, (insn >> 16) & 0xff,
1973+
(insn >> 8) & 0xff, insn & 0xff);
1974+
19711975
for (i = 0; i < NUMOPCODES; ++i)
19721976
{
19731977
const struct pa_opcode *opcode = &pa_opcodes[i];
@@ -2826,6 +2830,6 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
28262830
return sizeof (insn);
28272831
}
28282832
}
2829-
(*info->fprintf_func) (info->stream, "#%8x", insn);
2833+
info->fprintf_func(info->stream, "<unknown>");
28302834
return sizeof (insn);
28312835
}

0 commit comments

Comments
 (0)