On 09/14, Roland McGrath wrote: > > This code has no comments whatsoever. I know you intend much more cleanup > to come anyway, but this can make it hard even to review the code and give > advice on the directions you are taking.
Yes. Will try to fix later. > I don't understand why you need the hairy ev_array logic at all. Basically, we have ev_push() and ev_pop(), that is all. Roughly speaking, if we are going to return UTRACE_STOP we call ev_push() to record the state. ptrace_resume() does ev_pop() and wakes up if there are no a stop event. > There isn't really any extra information you need to record, is there? We need to record the values for task->exit_code and task->ptrace_message at least. _Perhaps_, we also need to record the bit from context->options, I am not sure. > Each "extra" event follows exactly one particular previous event, so > it's just a very simple state machine. Yes, this is mostly simple. But probably sometimes we need some fixups when chane the state. Again, I am not sure, dind't sleep today. Oleg.