/trunk/kernel/generic/include/interrupt.h |
---|
44,12 → 44,12 |
typedef void (* iroutine)(int n, istate_t *istate); |
#define fault_if_from_uspace(istate, cmd, ...) \ |
#define fault_if_from_uspace(istate, fmt, ...) \ |
{ \ |
if (istate_from_uspace(istate)) { \ |
task_t *task = TASK; \ |
printf("Task %" PRIu64 " killed due to an exception at %p.", task->taskid, istate_get_pc(istate)); \ |
printf(" " cmd, ##__VA_ARGS__); \ |
printf(" " fmt "\n", ##__VA_ARGS__); \ |
task_kill(task->taskid); \ |
thread_exit(); \ |
} \ |
/trunk/kernel/generic/src/interrupt/interrupt.c |
---|
105,8 → 105,8 |
/** Default 'null' exception handler */ |
static void exc_undef(int n, istate_t *istate) |
{ |
fault_if_from_uspace(istate, "Unhandled exception %d.", n); |
panic("Unhandled exception %d.", n); |
fault_if_from_uspace(istate, "Unhandled exception %d", n); |
panic("Unhandled exception %d", n); |
} |
#ifdef CONFIG_KCONSOLE |