Skip to contentSkip to conversation

Show thumb state in cpu dump

PATCH New Paul Brook 1 participant 1 message Aug 14, 2005

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

PATCH 1/1 Show thumb state in cpu dump

The patch below makes the Arm CPU debugging dumps show the Thumb state bit symbolically.

Paul

Index: target-arm/translate.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/translate.c,v retrieving revision 1.26

translate.c +3 -2
diff -u -p -r1.26 translate.c
@@ -2204,12 +2214,13 @@ void cpu_dump_state(CPUState *env, FILE 
         else
             cpu_fprintf(f, " ");
     }
-    cpu_fprintf(f, "PSR=%08x %c%c%c%c\n", 
+    cpu_fprintf(f, "PSR=%08x %c%c%c%c %c\n", 
              env->cpsr, 
             env->cpsr & (1 << 31) ? 'N' : '-',
             env->cpsr & (1 << 30) ? 'Z' : '-',
             env->cpsr & (1 << 29) ? 'C' : '-',
-            env->cpsr & (1 << 28) ? 'V' : '-');
+            env->cpsr & (1 << 28) ? 'V' : '-',
+            env->thumb ? 'T' : 'A');
 
     for (i = 0; i < 16; i++) {
         d.d = env->vfp.regs[i];