192,6 → 192,30 |
} |
} |
|
/** Check whether the abort was caused by a bkpt instruction. |
* |
* This must be called after (possibly) fetching the faulting page. |
* |
* TODO: When paging-out is implemented, make sure the page |
* is still present when reading the instruction (we don't want |
* to trigger another exception). |
*/ |
static void bkpt_check(istate_t *istate) |
{ |
uint32_t *instr_addr = (uint32_t *) istate->pc; |
uint32_t opcode = *instr_addr; |
|
if ((opcode & 0xfff000f0) == 0xe1200070) { |
/* Bkpt */ |
if (istate_from_uspace(istate)) { |
udebug_breakpoint_event(0); |
} else { |
panic("Unexpected BKPT instruction at 0x%x", |
istate->pc); |
} |
} |
} |
|
/** Handles "prefetch abort" exception (instruction couldn't be executed). |
* |
* @param exc_no Exception number. |
207,6 → 231,9 |
panic("page fault - prefetch_abort at address: %x\n", |
istate->pc); |
} |
|
/* Now check if the abort was caused by a breakpoint instruction */ |
bkpt_check(istate); |
} |
|
/** @} |