From patchwork Wed Sep 25 18:59:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 277964 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DEF0F2C00CC for ; Thu, 26 Sep 2013 05:04:16 +1000 (EST) Received: from localhost ([::1]:54362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOuNj-0004gO-0n for incoming@patchwork.ozlabs.org; Wed, 25 Sep 2013 15:04:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOuJq-0000kl-Dw for qemu-devel@nongnu.org; Wed, 25 Sep 2013 15:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOuJh-000055-Fo for qemu-devel@nongnu.org; Wed, 25 Sep 2013 15:00:14 -0400 Received: from ssl.serverraum.org ([2a01:4f8:a0:1283::1:2]:52241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOuJh-0008Nm-7p for qemu-devel@nongnu.org; Wed, 25 Sep 2013 15:00:05 -0400 Received: from localhost (localhost [127.0.0.1]) by ssl.serverraum.org (Postfix) with ESMTP id 9E8A43F09A; Wed, 25 Sep 2013 21:00:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ssl.serverraum.org Received: from ssl.serverraum.org ([127.0.0.1]) by localhost (ssl.serverraum.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id phuWI2pI72B9; Wed, 25 Sep 2013 21:00:04 +0200 (CEST) Received: from thanatos.fritz.box (88-134-163-112-dynip.superkabel.de [88.134.163.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 56C713F079; Wed, 25 Sep 2013 21:00:04 +0200 (CEST) From: Michael Walle To: qemu-devel@nongnu.org Date: Wed, 25 Sep 2013 20:59:32 +0200 Message-Id: <1380135572-25095-12-git-send-email-michael@walle.cc> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1380135572-25095-1-git-send-email-michael@walle.cc> References: <1380135572-25095-1-git-send-email-michael@walle.cc> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:a0:1283::1:2 Cc: Michael Walle Subject: [Qemu-devel] [PULL 11/11] lm32_sys: dump cpu state if test case fails X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This will ease debugging the test cases. Signed-off-by: Michael Walle --- hw/misc/lm32_sys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/misc/lm32_sys.c b/hw/misc/lm32_sys.c index 6af0cca..1fd69ff 100644 --- a/hw/misc/lm32_sys.c +++ b/hw/misc/lm32_sys.c @@ -81,6 +81,9 @@ static void sys_write(void *opaque, hwaddr addr, s->regs[addr] = value; testname = (char *)s->testname; fprintf(stderr, "TC %-32s %s\n", testname, (value) ? "FAILED" : "OK"); + if (value) { + cpu_dump_state(qemu_get_cpu(0), stderr, fprintf, 0); + } break; case R_TESTNAME: s->regs[addr] = value;