Hi,
There is one regression for PTRACE_SINGLESTEP on 2.6.28-rc7/8 + utrace.
See test case,
http://sources.redhat.com/cgi-bin/cvsweb.cgi/tests/ptrace-tests/tests/step-simple.c?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=systemtap
I made some analysis and found something. The main problem is in
ptrace_resume (kernel/ptrace.c).
For ptrace(PTRACE_SINGLESTEP, child, 0, 0), we ran into
ptrace_resume. Then
action: UTRACE_RESUME -> UTRACE_SINGLESTEP -> UTRACE_REPORT
Next, utrace_control will let child resume freely.
But for ptrace(PTRACE_SINGLESTEP, child, 0, SIGUSR1) (whatever data),
we ran in ptrace_resume
action: UTRACE_RESUME -> UTRACE_SINGLESTEP -> UTRACE_REPORT ->
UTRACE_INTERRUPT
utrace_control will resume child. Maybe there will be some other
actions. But child will be in step. The test can pass.
Seem the data can affect the behavior. Hopefully, this can make sense.
Regards,
Wenji