Commit c8f79b67cf6f03cea76185f11094dbceff67a0ef

Authored by aliguori
1 parent 8fcd3692

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
Showing 1 changed file with 4 additions and 1 deletions
monitor.c
... ... @@ -596,7 +596,10 @@ static void memory_dump(int count, int format, int wsize,
596 596 env = mon_get_cpu();
597 597 if (!env)
598 598 break;
599   - cpu_memory_rw_debug(env, addr, buf, l, 0);
  599 + if (cpu_memory_rw_debug(env, addr, buf, l, 0) < 0) {
  600 + term_printf(" Cannot access memory\n");
  601 + break;
  602 + }
600 603 }
601 604 i = 0;
602 605 while (i < l) {
... ...