good day
Im totally newbie to l4, but my aim is to develop source level debugger for our system built on top of L4. So the procedure for source level debugger is common and may be presented in following steps:
1) Cause undef exception from user task (using undef instruction) 2) Catch it by undef exception handler 3) Save CPU registers 4) Suspend running thread. Suspension must be performed by my code - not by l4 system code. 5) Continue execution with next scheduled thread
But untill now i have no ideas how to suspend thead by my self. I even cant find l4 code responsible for thread suspension.
Does anyone knows where can i find suspention procedure in l4 code? Probably someone has code snippets for such kind of actions?
thanks in advance
Hi,
On Thu Mar 20, 2008 at 08:12:13 -0700, Andrew Vadimovich wrote:
Im totally newbie to l4, but my aim is to develop source level debugger for our system built on top of L4. So the procedure for source level debugger is common and may be presented in following steps:
- Cause undef exception from user task (using undef instruction)
- Catch it by undef exception handler
- Save CPU registers
- Suspend running thread. Suspension must be performed by my code - not by
l4 system code. 5) Continue execution with next scheduled thread
But untill now i have no ideas how to suspend thead by my self. I even cant find l4 code responsible for thread suspension.
Does anyone knows where can i find suspention procedure in l4 code? Probably someone has code snippets for such kind of actions?
When a thread causes an exception and the exception handler receives the according IPC, then the thread is already suspended. No need to suspend it yourself. The thread will resume execution upon response of the exception handler.
Adam
Adam Lackorzynski wrote:
When a thread causes an exception and the exception handler receives the according IPC, then the thread is already suspended. No need to suspend it yourself. The thread will resume execution upon response of the exception handler.
Adam
Adam adam@os.inf.tu-dresden.de Lackorzynski http://os.inf.tu-dresden.de/~adam/
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
When i say "suspend" - i mean suspend not only for exception handler operation - but for a long time until i want thread to run.
On Mon Mar 24, 2008 at 19:34:52 -0700, Andrew Vadimovich wrote:
Adam Lackorzynski wrote:
When a thread causes an exception and the exception handler receives the according IPC, then the thread is already suspended. No need to suspend it yourself. The thread will resume execution upon response of the exception handler.
When i say "suspend" - i mean suspend not only for exception handler operation - but for a long time until i want thread to run.
Sure, no problem, do the reply to the specific thread after the long time. There's no need the reply must happen immediately (what ever that should mean).
Adam
Andrew Vadimovich wrote:
[...]
Does anyone knows where can i find suspention procedure in l4 code? Probably someone has code snippets for such kind of actions?
You could check out, how L4Linux handles kProbe-Events (triggered by int3 instructions on native Linux and hlt instructions in L4Linux).
Cheers, Martin
l4-hackers@os.inf.tu-dresden.de