From d7aaba8c85cc71f3184cddcf20b740c5157c864d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 7 Dec 2014 11:49:52 +0100 Subject: Refactor kmalloc & tests in kmain. --- kernel/l0/region.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kernel/l0/region.c') diff --git a/kernel/l0/region.c b/kernel/l0/region.c index aa73a22..3691747 100644 --- a/kernel/l0/region.c +++ b/kernel/l0/region.c @@ -336,6 +336,8 @@ region_info_t *find_region(void* addr) { void stack_pf_handler(pagedir_t *pd, struct region_info *r, void* addr) { if (addr < r->addr + PAGE_SIZE) { dbg_printf("Stack overflow at 0x%p.", addr); + if (r->type & REGION_T_KPROC_STACK) dbg_printf(" (in kernel process stack)\n"); + if (r->type & REGION_T_PROC_KSTACK) dbg_printf(" (in process kernel stack)\n"); dbg_print_region_stats(); PANIC("Stack overflow."); } -- cgit v1.2.3