qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RESEND][PATCH] Report unmapped addresses in memory_dump


From: Jan Kiszka
Subject: [Qemu-devel] [RESEND][PATCH] Report unmapped addresses in memory_dump
Date: Tue, 01 Jul 2008 08:43:36 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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

Signed-off-by: Jan Kiszka <address@hidden>
---
 monitor.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: b/monitor.c
===================================================================
--- a/monitor.c
+++ b/monitor.c
@@ -596,7 +596,10 @@ static void memory_dump(int count, int f
             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) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]