diff options
-rw-r--r-- | agent/tcf/services/runctrl.c | 4 | ||||
-rw-r--r-- | agent/tcf/services/runctrl.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/agent/tcf/services/runctrl.c b/agent/tcf/services/runctrl.c index ac12abbb..c598f709 100644 --- a/agent/tcf/services/runctrl.c +++ b/agent/tcf/services/runctrl.c @@ -2563,6 +2563,10 @@ void check_all_stopped(Context * ctx) { cache_wait(&safe_events_cache); } +void wait_safe_events_done(void) { + if (safe_event_list != NULL) cache_wait(&safe_events_cache); +} + int safe_context_single_step(Context * ctx) { int res = 0; ContextExtensionRC * ext = EXT(ctx); diff --git a/agent/tcf/services/runctrl.h b/agent/tcf/services/runctrl.h index 528e0fdd..96560ce4 100644 --- a/agent/tcf/services/runctrl.h +++ b/agent/tcf/services/runctrl.h @@ -114,6 +114,11 @@ extern int safe_context_single_step(Context * ctx); extern void check_all_stopped(Context * ctx); /* + * Suspend current ACPM transaction until all pending safe events are precessed. + */ +extern void wait_safe_events_done(void); + +/* * Return 1 if all threads in a debuggee are stopped and handling of incoming messages * is suspended, and it is safe to access debuggee memory, plant breakpoints, etc. * Only threads that belong to CONTEXT_GROUP_STOP of 'ctx' are checked. |