diff --git a/lib/aos/paging.c b/lib/aos/paging.c index 4aac581..be8289e 100644 --- a/lib/aos/paging.c +++ b/lib/aos/paging.c @@ -97,11 +97,11 @@ static void pt_exception_handler(enum exception_type type, int subtype, errval_t err; lvaddr_t ip = registers_get_ip(regs); - debug_printf("[pt_exception_handler] type=%s, addr=%p, ip=%p\n", - pt_exception_type_to_string(type, subtype), - addr, - ip - ); + // debug_printf("[pt_exception_handler] type=%s, addr=%p, ip=%p\n", + // pt_exception_type_to_string(type, subtype), + // addr, + // ip + // ); // WARNING: these debug calls can overflow the stack // debug_print_save_area(regs); // debug_dump(regs); @@ -125,16 +125,17 @@ static void pt_exception_handler(enum exception_type type, int subtype, } } if (vaddr_reg == NULL) { - debug_printf("[pt_exception_handler] page_addr = 0x%x\n", page_addr); + debug_printf("[pt_exception_handler] type=%s, addr=%p, ip=%p, page_addr=0x%x\n", pt_exception_type_to_string(type, subtype), addr, ip, page_addr); thread_mutex_unlock(&st->lock); USER_PANIC("[pt_exception_handler][ERROR] Page fault ouside valid virtual address space"); } if (vaddr_reg->free) { - debug_printf("[pt_exception_handler] page_addr = 0x%x, base = 0x%x, size = 0x%x\n", page_addr, vaddr_reg->base, vaddr_reg->size); + debug_printf("[pt_exception_handler] type=%s, addr=%p, ip=%p, page_addr=0x%x, base=0x%x, size=0x%x\n", pt_exception_type_to_string(type, subtype), addr, ip, page_addr, vaddr_reg->base, vaddr_reg->size); thread_mutex_unlock(&st->lock); USER_PANIC("[pt_exception_handler][ERROR] Page fault ouside allocated address space"); } if (!vaddr_reg->heap) { + debug_printf("[pt_exception_handler] type=%s, addr=%p, ip=%p\n", pt_exception_type_to_string(type, subtype), addr, ip); thread_mutex_unlock(&st->lock); USER_PANIC("[ERROR] Page fault in allocated address space but outside heap"); }