From: Tomas Hruby Date: Wed, 2 Jun 2010 08:53:49 +0000 (+0000) Subject: Fixed stack trace if panic in stop_context() X-Git-Tag: v3.1.7~16 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=7bfa47476c29c778af834e3968b0458cfec033ac;p=minix.git Fixed stack trace if panic in stop_context() --- diff --git a/kernel/arch/i386/mpx.S b/kernel/arch/i386/mpx.S index 2b83ee444..4e969e6c3 100644 --- a/kernel/arch/i386/mpx.S +++ b/kernel/arch/i386/mpx.S @@ -233,9 +233,9 @@ csinit: \ SAVE_PROCESS_CTX(0) ;\ push %ebp ;\ + movl $0, %ebp /* for stack trace */ ;\ call _context_stop ;\ add $4, %esp ;\ - movl $0, %ebp /* for stack trace */ ;\ PIC_IRQ_HANDLER(irq) ;\ movb $END_OF_INT, %al ;\ outb $INT_CTL /* reenable interrupts in master pic */ ;\ @@ -301,9 +301,9 @@ _hwint07: \ SAVE_PROCESS_CTX(0) ;\ push %ebp ;\ + movl $0, %ebp /* for stack trace */ ;\ call _context_stop ;\ add $4, %esp ;\ - movl $0, %ebp /* for stack trace */ ;\ PIC_IRQ_HANDLER(irq) ;\ movb $END_OF_INT, %al ;\ outb $INT_CTL /* reenable interrupts in master pic */ ;\ @@ -385,11 +385,10 @@ _ipc_entry: /* stop user process cycles */ push %ebp - call _context_stop - add $4, %esp - /* for stack trace */ movl $0, %ebp + call _context_stop + add $4, %esp call _do_ipc @@ -422,11 +421,10 @@ _kernel_call_entry: /* stop user process cycles */ push %ebp - call _context_stop - add $4, %esp - /* for stack trace */ movl $0, %ebp + call _context_stop + add $4, %esp call _kernel_call @@ -455,11 +453,10 @@ exception_entry_from_user: /* stop user process cycles */ push %ebp - call _context_stop - add $4, %esp - /* for stack trace clear %ebp */ movl $0, %ebp + call _context_stop + add $4, %esp /* * push a pointer to the interrupt state pushed by the cpu and the