1
0
Fork 0
forked from Miroirs/x49gp
x50ng/qemu/patches/qemu-0.9.0-x49gp-debug-unassigned.patch

36 lines
909 B
Diff

diff -ur qemu/exec.c qemu-0.9.0/exec.c
--- qemu/exec.c 2007-02-06 00:01:54.000000000 +0100
+++ qemu-0.9.0/exec.c 2007-07-10 09:14:31.000000000 +0200
@@ -41,7 +41,7 @@
//#define DEBUG_TB_INVALIDATE
//#define DEBUG_FLUSH
//#define DEBUG_TLB
-//#define DEBUG_UNASSIGNED
+#define DEBUG_UNASSIGNED
/* make various TB consistency checks */
//#define DEBUG_TB_CHECK
@@ -1812,10 +1812,14 @@
return p->phys_offset;
}
+CPUState *__GLOBAL_env;
+
static uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr)
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem read 0x%08x\n", (int)addr);
+ cpu_dump_state(__GLOBAL_env, stdout, fprintf, 0);
+ abort();
#endif
return 0;
}
@@ -1824,6 +1828,8 @@
{
#ifdef DEBUG_UNASSIGNED
printf("Unassigned mem write 0x%08x = 0x%x\n", (int)addr, val);
+ cpu_dump_state(__GLOBAL_env, stdout, fprintf, 0);
+ abort();
#endif
}