From 2396628bb45718f0623614c6adece1a978808e5d Mon Sep 17 00:00:00 2001 From: David Xu Date: Tue, 20 Jul 2004 01:38:59 +0000 Subject: [PATCH] Make end of frames for KSE thread, for system scope thread, without this change, debugger will dump a weird stack backtrace. --- sys/i386/i386/vm_machdep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index dca0f15c681a..4452acf2f579 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -441,6 +441,7 @@ cpu_set_upcall_kse(struct thread *td, struct kse_upcall *ku) * Set the trap frame to point at the beginning of the uts * function. */ + td->td_frame->tf_ebp = 0; td->td_frame->tf_esp = (int)ku->ku_stack.ss_sp + ku->ku_stack.ss_size - 16; td->td_frame->tf_eip = (int)ku->ku_func;