From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDZaX-0004o5-G6 for qemu-devel@nongnu.org; Tue, 01 Jul 2008 02:43:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDZaV-0004mj-LV for qemu-devel@nongnu.org; Tue, 01 Jul 2008 02:43:41 -0400 Received: from [199.232.76.173] (port=38216 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDZaV-0004md-GR for qemu-devel@nongnu.org; Tue, 01 Jul 2008 02:43:39 -0400 Received: from mx20.gnu.org ([199.232.41.8]:27707) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KDZaV-0005GW-4J for qemu-devel@nongnu.org; Tue, 01 Jul 2008 02:43:39 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KDZaU-0006Fz-Bf for qemu-devel@nongnu.org; Tue, 01 Jul 2008 02:43:38 -0400 Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate02.web.de (Postfix) with ESMTP id 513D8E3BCF2D for ; Tue, 1 Jul 2008 08:43:37 +0200 (CEST) Received: from [88.64.25.246] (helo=[192.168.1.198]) by smtp05.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1KDZaT-0002Ou-00 for qemu-devel@nongnu.org; Tue, 01 Jul 2008 08:43:37 +0200 Message-ID: <4869D218.70008@web.de> Date: Tue, 01 Jul 2008 08:43:36 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <484BED84.6070805@web.de> In-Reply-To: <484BED84.6070805@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] [RESEND][PATCH] Report unmapped addresses in memory_dump Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Instead of dumping incorrect (ie. previously read) data, report the invalid virtual address to the user. Signed-off-by: Jan Kiszka --- 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) {