107 lines
4.5 KiB
Plaintext
107 lines
4.5 KiB
Plaintext
$OpenBSD: patch-cpu_cpu_cc,v 1.2 2001/02/02 22:34:58 todd Exp $
|
|
--- cpu/cpu.cc.orig Sat Mar 25 21:39:07 2000
|
|
+++ cpu/cpu.cc Fri Feb 2 16:25:06 2001
|
|
@@ -259,32 +259,32 @@ debugger_check:
|
|
if (BX_CPU_THIS_PTR break_point) {
|
|
switch (BX_CPU_THIS_PTR break_point) {
|
|
case BREAK_POINT_TIME:
|
|
- bx_printf("[%lld] Caught time breakpoint\n", bx_pc_system.time_ticks());
|
|
+ bio->printf("[CPU%u] [%lld] Caught time breakpoint\n", BX_SIM_ID, bx_pc_system.time_ticks());
|
|
BX_CPU_THIS_PTR stop_reason = STOP_TIME_BREAK_POINT;
|
|
return;
|
|
case BREAK_POINT_READ:
|
|
- bx_printf("[%lld] Caught read watch point\n", bx_pc_system.time_ticks());
|
|
+ bio->printf("[CPU%u] [%lld] Caught read watch point\n", bx_pc_system.time_ticks(), BX_SIM_ID);
|
|
BX_CPU_THIS_PTR stop_reason = STOP_READ_WATCH_POINT;
|
|
return;
|
|
case BREAK_POINT_WRITE:
|
|
- bx_printf("[%lld] Caught write watch point\n", bx_pc_system.time_ticks());
|
|
+ bio->printf("[CPU%u] [%lld] Caught write watch point\n", bx_pc_system.time_ticks(), BX_SIM_ID);
|
|
BX_CPU_THIS_PTR stop_reason = STOP_WRITE_WATCH_POINT;
|
|
return;
|
|
default:
|
|
- bx_panic("Weird break point condition");
|
|
+ bio->panic("Weird break point condition");
|
|
}
|
|
}
|
|
#ifdef MAGIC_BREAKPOINT
|
|
// (mch) Magic break point support
|
|
if (BX_CPU_THIS_PTR magic_break) {
|
|
- if (bx_dbg.magic_break_enabled) {
|
|
- bx_printf("Stopped on MAGIC BREAKPOINT\n");
|
|
+ if (bio->getdbg().magic_break_enabled) {
|
|
+ bio->printf("[CPU%u] Stopped on MAGIC BREAKPOINT\n", BX_SIM_ID);
|
|
BX_CPU_THIS_PTR stop_reason = STOP_MAGIC_BREAK_POINT;
|
|
return;
|
|
} else {
|
|
BX_CPU_THIS_PTR magic_break = 0;
|
|
BX_CPU_THIS_PTR stop_reason = STOP_NO_REASON;
|
|
- bx_printf("Ignoring MAGIC BREAKPOINT\n");
|
|
+ bio->printf("[CPU%u] Ignoring MAGIC BREAKPOINT\n", BX_SIM_ID);
|
|
}
|
|
}
|
|
#endif
|
|
@@ -326,7 +326,7 @@ static Bit8u FetchBuffer[16];
|
|
|
|
if (BX_CPU_THIS_PTR bytesleft < 16) {
|
|
// make sure (bytesleft - remain) below doesn't go negative
|
|
- bx_panic("fetch_decode: bytesleft==0 after prefetch\n");
|
|
+ bio->panic("fetch_decode: bytesleft==0 after prefetch\n");
|
|
}
|
|
temp_ptr = fetch_ptr = BX_CPU_THIS_PTR fetch_ptr;
|
|
|
|
@@ -336,7 +336,7 @@ static Bit8u FetchBuffer[16];
|
|
}
|
|
ret = FetchDecode(FetchBuffer, &i, 16, is_32);
|
|
if (ret==0)
|
|
- bx_panic("fetchdecode: cross boundary: ret==0\n");
|
|
+ bio->panic("fetchdecode: cross boundary: ret==0\n");
|
|
if (i.ResolveModrm) {
|
|
i.ResolveModrm(&i);
|
|
}
|
|
@@ -418,7 +418,7 @@ handle_async_event:
|
|
|
|
// NOTE: similar code in ::take_irq()
|
|
vector = BX_IAC(); // may set INTR with next interrupt
|
|
- //if (bx_dbg.interrupts) bx_printf("decode: interrupt %u\n",
|
|
+ //if (bio->getdbg().interrupts) bio->printf("[CPU%u] decode: interrupt %u\n", BX_SIM_ID,
|
|
// (unsigned) vector);
|
|
BX_CPU_THIS_PTR errorno = 0;
|
|
BX_CPU_THIS_PTR EXT = 1; /* external event */
|
|
@@ -500,7 +500,7 @@ BX_CPU_C::prefetch(void)
|
|
new_linear_addr = BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.base + temp_eip;
|
|
BX_CPU_THIS_PTR prev_linear_page = new_linear_addr & 0xfffff000;
|
|
if (temp_eip > temp_limit) {
|
|
- bx_panic("prefetch: EIP > CS.limit\n");
|
|
+ bio->printf("[CPU%u] prefetch: EIP > CS.limit\n", BX_SIM_ID);
|
|
}
|
|
|
|
if (BX_CPU_THIS_PTR cr0.pg) {
|
|
@@ -516,7 +516,7 @@ BX_CPU_C::prefetch(void)
|
|
// don't take this out if dynamic translation enabled,
|
|
// otherwise you must make a check to see if bytesleft is 0 after
|
|
// a call to prefetch() in the dynamic code.
|
|
- bx_panic("prefetch: running in bogus memory\n");
|
|
+ bio->panic("prefetch: running in bogus memory\n");
|
|
}
|
|
|
|
// max physical address as confined by page boundary
|
|
@@ -584,7 +584,7 @@ BX_CPU_C::dbg_is_begin_instr_bpoint(Bit3
|
|
// (not the one generating the mode switch).
|
|
if (BX_CPU_THIS_PTR mode_break &&
|
|
(BX_CPU_THIS_PTR debug_vm != BX_CPU_THIS_PTR eflags.vm)) {
|
|
- bx_printf("Caught vm mode switch breakpoint\n");
|
|
+ bio->printf("[CPU%u] Caught vm mode switch breakpoint\n", BX_SIM_ID);
|
|
BX_CPU_THIS_PTR debug_vm = BX_CPU_THIS_PTR eflags.vm;
|
|
BX_CPU_THIS_PTR stop_reason = STOP_MODE_BREAK_POINT;
|
|
return 1;
|
|
@@ -679,7 +679,7 @@ BX_CPU_C::dbg_is_end_instr_bpoint(Bit32u
|
|
bx_dbg_async_pin_ack(BX_DBG_ASYNC_PENDING_A20,
|
|
bx_guard.async_changes_pending.a20);
|
|
if (bx_guard.async_changes_pending.which) {
|
|
- bx_panic("decode: async pending unrecognized.\n");
|
|
+ bio->panic("decode: async pending unrecognized.\n");
|
|
}
|
|
}
|
|
#endif
|