[PATCH] Try to use PTRACE_SETOPTIONS to handle non-ptrace SIGTRAP

Roland McGrath roland at redhat.com
Fri Jul 23 09:45:50 UTC 2010


> >> > 	if (exiting(tcp) && !syserror(tcp))
> >> > 		tcp->flags |= TCB_WAITEXECVE;
> >> 
> >> This is of course wrong.
> >
> > Are you kidding?
> 
> Of course not!  How do you think does this bit get cleared again?

How does it get cleared now?  It's only in get_scno, and only for some
machines.  Ok, this is pretty confusing.  

The bit is not actually used on x86, because you can just look at the
register state and decide that it must not be a syscall stop.  That's some
pretty wacky logic there, and it's hard to say it's really better than
just using the TCB_WAITEXECVE state like some other machines do.

On machines that ever actually look at the bit, they look at it in get_scno
and they clear it there too.  So that will not be changed by fixing
internal_exec as I said above.


Thanks,
Roland




More information about the Strace-devel mailing list