From 74c17141dc2b21ad12bf8108d8f31e85007c8b07 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 30 Aug 2007 02:27:06 +0000 Subject: [PATCH] arch_debug_get_caller() was returning the return address of the wrong stack frame (i.e. its own). Not sure what the comment is supposed to mean. Tested with gcc 2 and 4. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22121 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/arch/x86/arch_debug.c b/src/system/kernel/arch/x86/arch_debug.c index 288e46566d..4aa56f70c3 100644 --- a/src/system/kernel/arch/x86/arch_debug.c +++ b/src/system/kernel/arch/x86/arch_debug.c @@ -301,7 +301,7 @@ arch_debug_get_caller(void) // be smart enough to save its original value. struct stack_frame *frame = (struct stack_frame *)x86_read_ebp(); - return (void *)frame->return_address; + return (void *)frame->previous->return_address; }