提交 c8f79b67 编写于 作者: A aliguori

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: NJan Kiszka <jan.kiszka@web.de>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5023 c046a42c-6fe2-441c-8c8c-71466251a162
上级 8fcd3692
...@@ -596,7 +596,10 @@ static void memory_dump(int count, int format, int wsize, ...@@ -596,7 +596,10 @@ static void memory_dump(int count, int format, int wsize,
env = mon_get_cpu(); env = mon_get_cpu();
if (!env) if (!env)
break; 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; i = 0;
while (i < l) { while (i < l) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册