Skip to contentSkip to conversation

[5023] Report unmapped addresses in memory_dump (Jan Kiszka)

Qemu-devel Anthony Liguori 1 participant 1 message Aug 18, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5023

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5023
Author:   aliguori
Date:     2008-08-18 14:00:20 +0000 (Mon, 18 Aug 2008)

Log Message:
-----------
Report unmapped addresses in memory_dump (Jan Kiszka)

Instead of dumping incorrect (ie. previously read) data, report the invalid virtual address to the user.

Modified Paths:
--------------
trunk/monitor.c

Modified: trunk/monitor.c
===================================================================

monitor.c +4 -1
@@ -596,7 +596,10 @@
             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) {