Skip to contentSkip to conversation

target-ppc: dump DAR and DSISR

PATCH Applied Anton Blanchard 2 participants 2 messages Dec 24, 2013 – Dec 29, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-ppc: dump DAR and DSISR

The DAR and DSISR can be very useful when debugging issues, so add them to ppc_cpu_dump_state. We had another bug in this area: all of the v2.06 MMU types were missing.

---

target-ppc/translate.c +6 -1
Index: b/target-ppc/translate.c
===================================================================
@@ -9861,8 +9861,13 @@ void ppc_cpu_dump_state(CPUState *cs, FI
     case POWERPC_MMU_SOFT_74xx:
 #if defined(TARGET_PPC64)
     case POWERPC_MMU_64B:
+    case POWERPC_MMU_2_06:
+    case POWERPC_MMU_2_06a:
+    case POWERPC_MMU_2_06d:
 #endif
-        cpu_fprintf(f, " SDR1 " TARGET_FMT_lx "\n", env->spr[SPR_SDR1]);
+        cpu_fprintf(f, " SDR1 " TARGET_FMT_lx "   DAR " TARGET_FMT_lx
+                       "  DSISR " TARGET_FMT_lx "\n", env->spr[SPR_SDR1],
+                    env->spr[SPR_DAR], env->spr[SPR_DSISR]);
         break;
     case POWERPC_MMU_BOOKE206:
         cpu_fprintf(f, " MAS0 " TARGET_FMT_lx "  MAS1 " TARGET_FMT_lx
#1 lore raw
Quoted 6 lines · Anton Blanchard

The DAR and DSISR can be very useful when debugging issues, so add them to ppc_cpu_dump_state. We had another bug in this area: all of the v2.06 MMU types were missing.

Thanks, applied to ppc-next.

Alex