From 762f62af45a92ba826f69ec8175eb386af17e52e Mon Sep 17 00:00:00 2001 From: Pierrick Bouvier Date: Fri, 20 Dec 2024 13:29:18 -0800 Subject: [PATCH] print insn instr --- tests/tcg/plugins/discons.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tcg/plugins/discons.c b/tests/tcg/plugins/discons.c index baf4b934efc8..a0e5e0a60611 100644 --- a/tests/tcg/plugins/discons.c +++ b/tests/tcg/plugins/discons.c @@ -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);