aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-18 14:00:20 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-18 14:00:20 +0000
commitc8f79b67cf6f03cea76185f11094dbceff67a0ef (patch)
tree66bb3d75d1d38fbbde5988f1f8b0cdaee064e5be /monitor.c
parent8fcd36920e1b0e5ff92efb16f7ae05112cd4defa (diff)
downloadqemu-c8f79b67cf6f03cea76185f11094dbceff67a0ef.zip
qemu-c8f79b67cf6f03cea76185f11094dbceff67a0ef.tar.gz
qemu-c8f79b67cf6f03cea76185f11094dbceff67a0ef.tar.bz2
Report unmapped addresses in memory_dump (Jan Kiszka)
Instead of dumping incorrect (ie. previously read) data, report the invalid virtual address to the user. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5023 c046a42c-6fe2-441c-8c8c-71466251a162
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 23b527e..0a3027c 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) {