[mkc2007] halting/resuming other threads

Torsten Frenzel frenzel at os.inf.tu-dresden.de
Fri Jun 8 11:38:29 CEST 2007


Benjamin Engel(be020578 at inf.tu-dresden.de)@2007.06.08 11:05:26 +0200:
> Hi,
> 
> sys_halt() and sys_resume() works fine for my threads as long as no ipc is
> involved (like l4_sleep() in my case). In IPC_timeout::expired() I added a
> test if the receiver state is halted, then do not change its state to
> thread_ready - fine. Nevertheless the halted thread is enqueued in the
> ready_list after some time by someone else. In order to figure out where
> this happens I would like to know 1) how to enter the debugger from within
> the kernel (like enter_kdebug() from user land) with a function call

kdb_ke("text") is your friend, may be you need to include kdb_ke.h

> (currently I am doing asm volatile int 0x3) and 2) the debugger says:
> "--kernel-bt-follows-- (don't trust w/o frame pointer!!)" so how to get
> the function names in the back trace to find out who invoked
> ready_enqueue() of the halted thread.
>

something like the following should work fine:

$KERNEL_PATH/fiasco 					\
	-i $KERNEL_PATH/irq0				\
	-S "$L4_PATH/sigma0"				\
	-R "$L4_PATH/roottask -symbols -lines"		\
	-Y $KERNEL_PATH/Symbols				\
	-L $KERNEL_PATH/Lines				\
	... modules

This script is also available on the webpage in the excercise section.

The cited statment above means that ebp is not used as frame pointer,
and the kernel has somehow to guess the stack frame size. You can change this
by disabling the 'Compile without frame pointer' option in the debug
menu.

Torsten



More information about the mkc2007 mailing list