#include <corax/types.h>
#include <corax/errno.h>
#include <debug.h>
+#include <process.h>
#include "cpu.h"
#include "defs.h"
void _exc_handle(stack_frame_t ctx)
{
+ process_t *cproc;
+
+ cproc = process_get_current();
+
dbg_printf("Exception %u [%s] occurred. Error code 0x%08x.\n", ctx.intn, ctx.intn < EXC_MAX ? _exc_name[ctx.intn] : 0, ctx.error);
+ dbg_printf("In context %p [pid %u]\n", cproc, process_get_id(cproc));
dbg_printf("Fault in 0x%02x:%08x; EFLAGS = 0x%08x\n", ctx.cs, ctx.eip, ctx.eflags);
if(ctx.intn == EXC_PAGEFAULT) {