Patchwork [009/111] m68k: add tcg_gen_debug_insn_start()

login
register
mail settings
Submitter Bryce Lanham
Date Aug. 17, 2011, 8:46 p.m.
Message ID <1313614076-28878-10-git-send-email-blanham@gmail.com>
Download mbox | patch
Permalink /patch/110471/
State New
Headers show

Comments

Bryce Lanham - Aug. 17, 2011, 8:46 p.m.
From: Laurent Vivier <laurent@vivier.eu>

This patch add debug info by writing the PC of the corresponing CPU
instruction of an TCG opcode.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target-m68k/translate.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 0e7f1fe..b86588c 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -2947,6 +2947,9 @@  static void disas_m68k_insn(CPUState * env, DisasContext *s)
 {
     uint16_t insn;
 
+    if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP)))
+        tcg_gen_debug_insn_start(s->pc);
+
     insn = lduw_code(s->pc);
     s->pc += 2;