Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2017-03-24 15:00:25 -0400
committerEugene Tarassov2017-03-24 15:00:25 -0400
commit800c1badb775f52aa7d2c5f1130e0f10bdb54828 (patch)
treef45522f8338d4f2dd6466045b3e4deeddb5bb8e2
parentf3b0f16d3e726a081a339d3111eb383fe9c62710 (diff)
downloadorg.eclipse.tcf.agent-800c1badb775f52aa7d2c5f1130e0f10bdb54828.tar.gz
org.eclipse.tcf.agent-800c1badb775f52aa7d2c5f1130e0f10bdb54828.tar.xz
org.eclipse.tcf.agent-800c1badb775f52aa7d2c5f1130e0f10bdb54828.zip
TCF Agent: new Run Control API function: wait_safe_events_done()
-rw-r--r--agent/tcf/services/runctrl.c4
-rw-r--r--agent/tcf/services/runctrl.h5
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.

Back to the top