On 02/25/2013 03:00 PM, Andrew Bernat wrote: > On Feb 25, 2013, at 1:17 PM, David Smith <[email protected] > <mailto:[email protected]>> wrote: > >> This works great for thread creation probes (for instance), but not for >> exit probes. When the exit callback happens, I call stopExecution(). >> However, when stopExecution() returns, the process has already >> terminated, so I can't call oneTimeCode(). > > Is there any way you can call the oneTimeCode directly from the > callback? The thread should still be present, if wrapping itself up, > when the callback is delivered. There is an inherent race condition if > something else is continuing the entire process but it doesn't sound > like that's happening here.
I'd like to call oneTimeCode() from the callback. However, oneTimeCode() refuses to run if (!proc->isStopped()). As I mentioned earlier, if I call stopExecution(), then the process exits. When stopExecution returns, proc->isTerminated() is true (when I'm in the exit callback). If I've misunderstood your answer, please let me know. -- David Smith [email protected] Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax) _______________________________________________ Dyninst-api mailing list [email protected] https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
