[PATCH 33] implement stacked stop events

Roland McGrath roland at redhat.com
Mon Sep 14 17:19:04 UTC 2009


> Basically, we have ev_push() and ev_pop(), that is all.

I don't mean it's hard to understand what the code does.  
It's clear enough that it's a simple ring buffer scheme.  

But just having that extra data structure is extra complexity and storage
even so.  It's quite overly general for what is really needed.

> 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.

Do you really need to store more than one ptrace_message word?  I don't
think so.  Let's think about the cases.  Where is there a "stacked" event
that has a message word?  I think that's only PTRACE_EVENT_VFORK_DONE.  Its
message word is the child's PID, which is the same word set previously by
the PTRACE_EVENT_VFORK report.  (If there is no PTRACE_EVENT_VFORK stop
requested, then you can just store that word anyway so it's there in case
of PTRACE_EVENT_VFORK_DONE later.)

Why do you think you might need to record any option bits?
The past state of option bits should not matter.

> 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.

I got your message last night but decided to sleep before replying. :-)


Thanks,
Roland




More information about the utrace-devel mailing list