There is another possibility to break out from UML and execute syscalls on the host! The problem is, that after having done ptrace_notify() in syscall_trace(), we could be restarted with PTRACE_SINGLESTEP, but will not execute do_signal(), since the debugger stop was not initiated by a real signal! Thus the next instruction to process isn't checked and is singlestepped even if it is a syscall. The sequence for breaking out is: 1) PTRACE_SYSCALL until the syscall-exit tracepoint is reached. 2) modify the registers of the traced process to meet the parameters and syscall number wanted 3) lower EIP of the traced process by 2, for syscall restarting 4) proceed with PTRACE_SINGLESTEP --> Breakout! I've included this as a new test case in breakout.c. It's test case 4. The old test case 4 is moved to 5. Further I've written a new test, which tests singlestepping in case of a signal handler being called. In 2.6.9 on i386, singlestepping is continued in the signal handler. UML 2.6.9 should do the same, I think. Running the new test on UML, I saw singlestepping being broken in some cases. The traced pürocess suddenly continued with PTRACE_CONT! I think, the reason is a signal other than SIGTRAP interrupting the process (maybe a SIGSEGV/pagefault?). After having processed that event, the kernel continues the userspace instead of singlestepping it. Thus, we have to remember PT_DTRACE and not reset it! Also, the test showed some differences between singlestepping on i386 and UML. It tries to singlestep 3 cases: 1) singlestepping a sigsuspend(), that waits for a SIGALRM signal handling is called from sys_sigsuspend() here 2) singlestepping a kill(getpid(), SIGALRM) signal_handling is called on the return from syscall 3) singlestepping a program loop without syscalls, waiting for SIGALRM signal_handling is called on return from kernel (after a interrupt / rescheduling) The attached patch should: - fix the breakout - set TIF_SIGPENDING after calling ptrace_notify() - fix the broken singlestepping - don't reset PT_DTRACE/singlestep_syscall while singlestepping - reset flags from ptrace_disable() and sys_ptrace() only. - make singlestepping on UML behave the same as on 2.6.9 i386 - not only set singlestep_syscall if is_syscall(), but also reset it if !is_syscall() - call ptrace_notify(), if a signal handler stackframe is generated (setting TIF_SIGPENDING not needed here) - remove force_sig(SIGTRAP) from execute_syscall_* and let ptrace_notify() be called from syscall_trace() in case of singlestepping. I've tested the patch on hosts running 2.6.7 and 2.6.9 in TT and SKAS with and without SYSEMU. (2.6.9 needs skas3.v6 + my latest patch) I couldn't see any differences between the 6 cases. And calling "step_sighdlr debug" shows the tracepoints to be exactly the same on UML and i386. Only speed / timing let the output vary. Both new tests are attached. Bodo