Enabled logging of all CPU exceptions.
This commit is contained in:
@@ -270,7 +270,7 @@ void x86_int_sw(int num)
|
|||||||
void x86illegal()
|
void x86illegal()
|
||||||
{
|
{
|
||||||
uint16_t addr;
|
uint16_t addr;
|
||||||
// pclog("x86 illegal %04X %08X %04X:%08X %02X\n",msw,cr0,CS,pc,opcode);
|
pclog("x86 illegal %04X %08X %04X:%08X %02X\n",msw,cr0,CS,cpu_state.pc,opcode);
|
||||||
|
|
||||||
// if (output)
|
// if (output)
|
||||||
// {
|
// {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
static int internal_illegal()
|
static int internal_illegal(char *s)
|
||||||
{
|
{
|
||||||
cpu_state.pc = oldpc;
|
cpu_state.pc = oldpc;
|
||||||
x86gpf(NULL, 0);
|
x86gpf(s, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,8 +32,8 @@ static int opSYSENTER(uint32_t fetchdat)
|
|||||||
|
|
||||||
pclog("SYSENTER called\n");
|
pclog("SYSENTER called\n");
|
||||||
|
|
||||||
if (!(cr0 & 1)) return internal_illegal();
|
if (!(cr0 & 1)) return internal_illegal("SYSENTER: CPU not in protected mode");
|
||||||
if (!(cs_msr & 0xFFFC)) return internal_illegal();
|
if (!(cs_msr & 0xFFFC)) return internal_illegal("SYSENTER: CS MSR not zero");
|
||||||
|
|
||||||
pclog("SYSENTER started:\n");
|
pclog("SYSENTER started:\n");
|
||||||
pclog("CS (%04X): base=%08X, limit=%08X, access=%02X, seg=%04X, limit_low=%08X, limit_high=%08X, checked=%i\n", CS, _cs.base, _cs.limit, _cs.access, _cs.seg, _cs.limit_low, _cs.limit_high, _cs.checked);
|
pclog("CS (%04X): base=%08X, limit=%08X, access=%02X, seg=%04X, limit_low=%08X, limit_high=%08X, checked=%i\n", CS, _cs.base, _cs.limit, _cs.access, _cs.seg, _cs.limit_low, _cs.limit_high, _cs.checked);
|
||||||
@@ -85,11 +85,11 @@ static int opSYSEXIT(uint32_t fetchdat)
|
|||||||
|
|
||||||
pclog("SYSEXIT called\n");
|
pclog("SYSEXIT called\n");
|
||||||
|
|
||||||
if (!(cs_msr & 0xFFFC)) return internal_illegal();
|
if (!(cs_msr & 0xFFFC)) return internal_illegal("SYSEXIT: CS MSR not zero");
|
||||||
if (!(cr0 & 1)) return internal_illegal();
|
if (!(cr0 & 1)) return internal_illegal("SYSEXIT: CPU not in protected mode");
|
||||||
if (CS & 3) return internal_illegal();
|
if (CS & 3) return internal_illegal("SYSEXIT: CPL not 0");
|
||||||
|
|
||||||
pclog("SYSEXIT completed:\n");
|
pclog("SYSEXIT start:\n");
|
||||||
pclog("CS (%04X): base=%08X, limit=%08X, access=%02X, seg=%04X, limit_low=%08X, limit_high=%08X, checked=%i\n", CS, _cs.base, _cs.limit, _cs.access, _cs.seg, _cs.limit_low, _cs.limit_high, _cs.checked);
|
pclog("CS (%04X): base=%08X, limit=%08X, access=%02X, seg=%04X, limit_low=%08X, limit_high=%08X, checked=%i\n", CS, _cs.base, _cs.limit, _cs.access, _cs.seg, _cs.limit_low, _cs.limit_high, _cs.checked);
|
||||||
pclog("SS (%04X): base=%08X, limit=%08X, access=%02X, seg=%04X, limit_low=%08X, limit_high=%08X, checked=%i\n", SS, _ss.base, _ss.limit, _ss.access, _ss.seg, _ss.limit_low, _ss.limit_high, _ss.checked);
|
pclog("SS (%04X): base=%08X, limit=%08X, access=%02X, seg=%04X, limit_low=%08X, limit_high=%08X, checked=%i\n", SS, _ss.base, _ss.limit, _ss.access, _ss.seg, _ss.limit_low, _ss.limit_high, _ss.checked);
|
||||||
pclog("Model specific registers: cs_msr=%04X, esp_msr=%08X, eip_msr=%08X\n", cs_msr, esp_msr, eip_msr);
|
pclog("Model specific registers: cs_msr=%04X, esp_msr=%08X, eip_msr=%08X\n", cs_msr, esp_msr, eip_msr);
|
||||||
|
@@ -145,25 +145,25 @@ void x86_doabrt(int x86_abrt)
|
|||||||
}
|
}
|
||||||
void x86gpf(char *s, uint16_t error)
|
void x86gpf(char *s, uint16_t error)
|
||||||
{
|
{
|
||||||
// pclog("GPF %04X : %s\n", error, s);
|
pclog("GPF %04X : %s\n", error, s);
|
||||||
abrt = ABRT_GPF;
|
abrt = ABRT_GPF;
|
||||||
abrt_error = error;
|
abrt_error = error;
|
||||||
}
|
}
|
||||||
void x86ss(char *s, uint16_t error)
|
void x86ss(char *s, uint16_t error)
|
||||||
{
|
{
|
||||||
// pclog("SS %04X\n", error);
|
pclog("SS %04X\n", error);
|
||||||
abrt = ABRT_SS;
|
abrt = ABRT_SS;
|
||||||
abrt_error = error;
|
abrt_error = error;
|
||||||
}
|
}
|
||||||
void x86ts(char *s, uint16_t error)
|
void x86ts(char *s, uint16_t error)
|
||||||
{
|
{
|
||||||
// pclog("TS %04X\n", error);
|
pclog("TS %04X\n", error);
|
||||||
abrt = ABRT_TS;
|
abrt = ABRT_TS;
|
||||||
abrt_error = error;
|
abrt_error = error;
|
||||||
}
|
}
|
||||||
void x86np(char *s, uint16_t error)
|
void x86np(char *s, uint16_t error)
|
||||||
{
|
{
|
||||||
// pclog("NP %04X : %s\n", error, s);
|
pclog("NP %04X : %s\n", error, s);
|
||||||
abrt = ABRT_NP;
|
abrt = ABRT_NP;
|
||||||
abrt_error = error;
|
abrt_error = error;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user