From 5ccf1db34d70cbd8bda31e7b49ad545b9523468c Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 4 Aug 2008 21:47:37 +0000 Subject: [PATCH] * Also print whether an iframe is a userland or kernel iframe. * In case of a kernel iframe the iframe is shorter -- fixed the output accordingly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26807 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_debug.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/arch/x86/arch_debug.cpp b/src/system/kernel/arch/x86/arch_debug.cpp index 1ac7cefc20..6c29056b71 100644 --- a/src/system/kernel/arch/x86/arch_debug.cpp +++ b/src/system/kernel/arch/x86/arch_debug.cpp @@ -152,14 +152,16 @@ print_stack_frame(struct thread *thread, addr_t eip, addr_t ebp, addr_t nextEbp, static void print_iframe(struct iframe *frame) { - kprintf("iframe at %p (end = %p)\n", frame, frame + 1); + bool isUser = IFRAME_IS_USER(frame); + kprintf("%s iframe at %p (end = %p)\n", isUser ? "user" : "kernel", frame, + isUser ? (uint32*)(frame + 1) : &frame->user_esp); kprintf(" eax 0x%-9lx ebx 0x%-9lx ecx 0x%-9lx edx 0x%lx\n", frame->eax, frame->ebx, frame->ecx, frame->edx); kprintf(" esi 0x%-9lx edi 0x%-9lx ebp 0x%-9lx esp 0x%lx\n", frame->esi, frame->edi, frame->ebp, frame->esp); kprintf(" eip 0x%-9lx eflags 0x%-9lx", frame->eip, frame->flags); - if ((frame->error_code & 0x4) != 0) { + if (isUser) { // from user space kprintf("user esp 0x%lx", frame->user_esp); }