From 71dffe8b84fee46d0e656c31a0f3c473164a6b4b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 3 Jul 2008 21:14:54 +0000 Subject: [PATCH] The stack layout changed in r23983. Since then user_debug_post_syscall() wouldn't be passed the syscall start time anymore. Fixes weird syscall timings when using strace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26243 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_interrupts.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/system/kernel/arch/x86/arch_interrupts.S b/src/system/kernel/arch/x86/arch_interrupts.S index 5842b603c6..7906bc0f9c 100644 --- a/src/system/kernel/arch/x86/arch_interrupts.S +++ b/src/system/kernel/arch/x86/arch_interrupts.S @@ -357,7 +357,8 @@ handle_syscall: movl %eax,%ds movl %eax,%es - lea 4(%esp), %ebp // stack frame pointer is the iframe + lea 4(%esp), %ebp // skipping the return address, the stack + // frame pointer is the iframe movl %dr3, %edi // thread pointer // disable breakpoints, if installed @@ -437,8 +438,8 @@ handle_syscall: // post syscall debugging testl $THREAD_FLAGS_DEBUGGER_INSTALLED, THREAD_flags(%edi) jz 1f - pushl -4(%ebp) // syscall start time - pushl -8(%ebp) + pushl -8(%ebp) // syscall start time + pushl -12(%ebp) movl IFRAME_edx(%ebp), %edx // syscall return value movl IFRAME_eax(%ebp), %eax push %edx