From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVl2O-0006xh-Ro for qemu-devel@nongnu.org; Mon, 14 Oct 2013 12:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVl2E-0002co-Gi for qemu-devel@nongnu.org; Mon, 14 Oct 2013 12:30:32 -0400 Received: from ssl.serverraum.org ([88.198.40.39]:57841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVl2E-0002bq-Bj for qemu-devel@nongnu.org; Mon, 14 Oct 2013 12:30:22 -0400 From: Michael Walle Date: Mon, 14 Oct 2013 18:29:34 +0200 Message-Id: <1381768175-13520-11-git-send-email-michael@walle.cc> In-Reply-To: <1381768175-13520-1-git-send-email-michael@walle.cc> References: <1381768175-13520-1-git-send-email-michael@walle.cc> Subject: [Qemu-devel] [PULL v2 10/11] lm32_sys: dump cpu state if test case fails List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Walle 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; -- 1.7.10.4