aboutsummaryrefslogtreecommitdiff
path: root/target/sh4/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/sh4/monitor.c')
-rw-r--r--target/sh4/monitor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/sh4/monitor.c b/target/sh4/monitor.c
index 426e5d4914..4c7f36c9cc 100644
--- a/target/sh4/monitor.c
+++ b/target/sh4/monitor.c
@@ -44,6 +44,11 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
CPUArchState *env = mon_get_cpu_env();
int i;
+ if (!env) {
+ monitor_printf(mon, "No CPU available\n");
+ return;
+ }
+
monitor_printf (mon, "ITLB:\n");
for (i = 0 ; i < ITLB_SIZE ; i++)
print_tlb (mon, i, &env->itlb[i]);