aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 23b527e0ea..0a3027cc77 100644
--- a/monitor.c
+++ b/monitor.c
@@ -596,7 +596,10 @@ static void memory_dump(int count, int format, int wsize,
env = mon_get_cpu();
if (!env)
break;
- cpu_memory_rw_debug(env, addr, buf, l, 0);
+ if (cpu_memory_rw_debug(env, addr, buf, l, 0) < 0) {
+ term_printf(" Cannot access memory\n");
+ break;
+ }
}
i = 0;
while (i < l) {