Handle the first SIGSTOP from the PT_ATTACH specially: instead of waking up some thread in the target process, execute sig_suspend_threads() in the debugger. This is equivalent to the action of the xthread, except that all threads are suspended without interruption.
Right now, the ptrace_test.c PT_SC_REMOTE fails because the child is stopped not at the k/u boundary. I think that the test should be changed, and not the PT_SC_REMOTE behavior.