Skip to content

Commit

Permalink
print insn instr
Browse files Browse the repository at this point in the history
  • Loading branch information
pbo-linaro committed Dec 20, 2024
1 parent 432257a commit 762f62a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/tcg/plugins/discons.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)

g_autoptr(GString) s = g_string_new("");
uint64_t vaddr = qemu_plugin_tb_vaddr(tb);
g_string_append_printf(s, "translate 0x%"PRIx64", %"PRIu64" insn\n", vaddr, n_insns);
g_string_printf(s, "translate 0x%"PRIx64", %"PRIu64" insn\n", vaddr, n_insns);
qemu_plugin_outs(s->str);

for (i = 0; i < n_insns; i++) {
struct qemu_plugin_insn * insn = qemu_plugin_tb_get_insn(tb, i);
uint64_t pc = qemu_plugin_insn_vaddr(insn);
g_string_printf(s, "instr insn 0x%"PRIx64"\n", pc);
qemu_plugin_outs(s->str);
qemu_plugin_register_vcpu_insn_exec_cb(insn, insn_exec,
QEMU_PLUGIN_CB_NO_REGS,
(void*) pc);
Expand Down

0 comments on commit 762f62a

Please sign in to comment.