On Tue, 17 Aug 2010, Paul Koning wrote: > > (3) if the process only has one thread ignore he argument. > > That means the semantics of ptrace can change out from under the program > using it. If it passes an argument to PT_STEP because there are two threads, > and one thread exits before the ptrace() call actually runs, then the > argument would be ignored producing an unexpected result.
Is that really a problem? If you are using PT_STEP then presumably the thread in question is stopped and can only die if something else sends a signal. If the other threads die then you are still single-stepping the thread you thought you would be single-stepping. If there is only one thread then he question about what to do about other threads is moot. OTOH versioning the interface is probably cleaner over all. Eduardo