Skip to contentSkip to conversation

tcg: add cs_base and flags to -d exec output

PATCH Applied Paolo Bonzini 3 participants 3 messages Dec 17, 2017 – Jan 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg: add cs_base and flags to -d exec output

---
 accel/tcg/cpu-exec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
accel/tcg/cpu-exec.c +4 -2
index 4318441e4c..18c1a2aedb 100644
@@ -146,8 +146,10 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
     uint8_t *tb_ptr = itb->tc.ptr;
 
     qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
-                           "Trace %p [%d: " TARGET_FMT_lx "] %s\n",
-                           itb->tc.ptr, cpu->cpu_index, itb->pc,
+                           "Trace %d: %p ["
+                           TARGET_FMT_lx "/" TARGET_FMT_lx "/%d] %s\n",
+                           cpu->cpu_index, itb->tc.ptr,
+                           itb->cs_base, itb->pc, itb->flags,
                            lookup_symbol(itb->pc));
 
 #if defined(DEBUG_DISAS)
Signature · 1 line
2.14.3
#1 lore raw
Quoted 10 lines · Paolo Bonzini
---
 accel/tcg/cpu-exec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
accel/tcg/cpu-exec.c +0 -0
index 4318441e4c..18c1a2aedb 100644

accel/tcg/cpu-exec.c static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb) · line 153

Quoted 10 lines
accel/tcg/cpu-exec.c +4 -2
@@ -146,8 +146,10 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
     uint8_t *tb_ptr = itb->tc.ptr;
 
     qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
-                           "Trace %p [%d: " TARGET_FMT_lx "] %s\n",
-                           itb->tc.ptr, cpu->cpu_index, itb->pc,
+                           "Trace %d: %p ["
+                           TARGET_FMT_lx "/" TARGET_FMT_lx "/%d] %s\n",
+                           cpu->cpu_index, itb->tc.ptr,
+                           itb->cs_base, itb->pc, itb->flags,
                            lookup_symbol(itb->pc));

Thanks, applied to tcg-next.

r~

#2 lore raw
In reply to Paolo Bonzini
Quoted 10 lines · Paolo Bonzini
---
 accel/tcg/cpu-exec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
accel/tcg/cpu-exec.c +0 -0
index 4318441e4c..18c1a2aedb 100644

accel/tcg/cpu-exec.c static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb) · line 153

Quoted 10 lines
accel/tcg/cpu-exec.c +4 -2
@@ -146,8 +146,10 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
     uint8_t *tb_ptr = itb->tc.ptr;
 
     qemu_log_mask_and_addr(CPU_LOG_EXEC, itb->pc,
-                           "Trace %p [%d: " TARGET_FMT_lx "] %s\n",
-                           itb->tc.ptr, cpu->cpu_index, itb->pc,
+                           "Trace %d: %p ["
+                           TARGET_FMT_lx "/" TARGET_FMT_lx "/%d] %s\n",
+                           cpu->cpu_index, itb->tc.ptr,
+                           itb->cs_base, itb->pc, itb->flags,
                            lookup_symbol(itb->pc));

At the risk of having to update my log-parsing scripts again, I notice that the output now looks a bit odd:

Trace 0: 0x7f70942390c0 [00000000/6aa01000/0x51080001] someFunction

in that the first two items in the [] have no preceding 0x but the last one does.

thanks
-- PMM