|
|
| version 1.4, 2004/01/23 14:33:26 | version 1.5, 2004/01/26 15:23:55 |
|---|---|
| Line 73 exception(int num, int error_code) | Line 73 exception(int num, int error_code) |
| __ASSERT((unsigned int)num < EXCEPTION_NUM); | __ASSERT((unsigned int)num < EXCEPTION_NUM); |
| VERBOSE(("exception: %s, error_code = %x at %04x:%08x", exception_str[num], error_code, CPU_CS, CPU_PREV_EIP)); | VERBOSE(("exception: %s, error_code = %x at %04x:%08x", exception_str[num], error_code, CPU_CS, CPU_PREV_EIP)); |
| VERBOSE(("exception:------------------------------------------------")); | |
| VERBOSE(("%s", cpu_reg2str())); | |
| VERBOSE(("exception:------------------------------------------------")); | |
| CPU_STAT_NERROR++; | CPU_STAT_NERROR++; |
| if ((CPU_STAT_NERROR >= 3) | if ((CPU_STAT_NERROR >= 3) |
| Line 132 exception(int num, int error_code) | Line 135 exception(int num, int error_code) |
| break; | break; |
| } | } |
| #if defined(DEBUG) | |
| if (num == PF_EXCEPTION) { | |
| VERBOSE(("exception: CPU_CR2 = %08x", CPU_CR2)); | |
| } | |
| #endif | |
| if (CPU_STAT_NERROR >= 2) { | if (CPU_STAT_NERROR >= 2) { |
| if (dftable[exctype[CPU_STAT_PREV_EXCEPTION]][exctype[num]]) { | if (dftable[exctype[CPU_STAT_PREV_EXCEPTION]][exctype[num]]) { |
| num = DF_EXCEPTION; | num = DF_EXCEPTION; |
| Line 146 exception(int num, int error_code) | Line 143 exception(int num, int error_code) |
| CPU_STAT_PREV_EXCEPTION = num; | CPU_STAT_PREV_EXCEPTION = num; |
| INTERRUPT(num, FALSE, errorp, error_code); | INTERRUPT(num, FALSE, errorp, error_code); |
| CPU_STAT_NERROR = 0; | |
| siglongjmp(exec_1step_jmpbuf, 1); | siglongjmp(exec_1step_jmpbuf, 1); |
| } | } |
| Line 393 interrupt_intr_or_trap(descriptor_t *gdp | Line 389 interrupt_intr_or_trap(descriptor_t *gdp |
| old_sp &= 0xffff; | old_sp &= 0xffff; |
| break; | break; |
| } | } |
| VERBOSE(("interrupt: old EIP = %04x:%08x, old ESP = %04x:%08x", old_cs, old_ip, old_ss, old_sp)); | VERBOSE(("interrupt: old EIP = %04x:%08x, ESP = %04x:%08x", old_cs, old_ip, old_ss, old_sp)); |
| rv = parse_selector(&intr_sel, gdp->u.gate.selector); | rv = parse_selector(&intr_sel, gdp->u.gate.selector); |
| if (rv < 0) { | if (rv < 0) { |
| Line 493 interrupt_intr_or_trap(descriptor_t *gdp | Line 489 interrupt_intr_or_trap(descriptor_t *gdp |
| } | } |
| load_ss(new_ss, &ss_sel.desc, intr_sel.desc.dpl); | load_ss(new_ss, &ss_sel.desc, intr_sel.desc.dpl); |
| if (CPU_STAT_SS32) { | CPU_ESP = new_sp; |
| CPU_ESP = new_sp; | |
| } else { | |
| CPU_SP = new_sp; | |
| } | |
| load_cs(intr_sel.selector, &intr_sel.desc, intr_sel.desc.dpl); | load_cs(intr_sel.selector, &intr_sel.desc, intr_sel.desc.dpl); |
| SET_EIP(new_ip); | SET_EIP(new_ip); |