diff options
author | Eugene Tarassov | 2012-01-02 22:43:56 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-01-02 22:43:56 +0000 |
commit | 565cc0e30e57881522f9b61d67549df1771d2d08 (patch) | |
tree | 03147196de9eaa73b873a875cd050348e60ef0df | |
parent | 7c9da913ecdc190950493a663b0a0ca9fa2ba6e9 (diff) | |
download | org.eclipse.tcf.agent-565cc0e30e57881522f9b61d67549df1771d2d08.tar.gz org.eclipse.tcf.agent-565cc0e30e57881522f9b61d67549df1771d2d08.tar.xz org.eclipse.tcf.agent-565cc0e30e57881522f9b61d67549df1771d2d08.zip |
TCF Agent: fixed assertion failure: assert(is_all_stopped()).
-rw-r--r-- | agent/tcf/services/runctrl.c | 5 | ||||
-rw-r--r-- | agent/tcf/services/runctrl.h | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/agent/tcf/services/runctrl.c b/agent/tcf/services/runctrl.c index a10a7447..1f67475e 100644 --- a/agent/tcf/services/runctrl.c +++ b/agent/tcf/services/runctrl.c @@ -1043,10 +1043,10 @@ int is_all_stopped(Context * ctx) { Context * grp = context_get_group(ctx, CONTEXT_GROUP_STOP); for (l = context_root.next; l != &context_root; l = l->next) { Context * ctx = ctxl2ctxp(l); - if (ctx->exited || ctx->exiting) continue; + if (ctx->stopped || ctx->exited || ctx->exiting || EXT(ctx)->safe_single_step) continue; if (!context_has_state(ctx)) continue; if (context_get_group(ctx, CONTEXT_GROUP_STOP) != grp) continue; - if (!ctx->stopped) return 0; + return 0; } return 1; } @@ -1759,6 +1759,7 @@ static void event_context_stopped(Context * ctx, void * client_data) { static void event_context_started(Context * ctx, void * client_data) { ContextExtensionRC * ext = EXT(ctx); assert(!ctx->stopped); + assert(run_ctrl_lock_cnt == 0 || ext->safe_single_step || ctx->exiting); if (ext->intercepted) resume_context_tree(ctx); ext->intercepted_by_bp = 0; if (safe_event_list) { diff --git a/agent/tcf/services/runctrl.h b/agent/tcf/services/runctrl.h index 3c931e64..4309a1a2 100644 --- a/agent/tcf/services/runctrl.h +++ b/agent/tcf/services/runctrl.h @@ -84,12 +84,11 @@ extern void post_safe_event(Context * ctx, EventCallBack * done, void * arg); extern int safe_context_single_step(Context * ctx); /* - * Return 1 if all threads in debuggee are stopped and handling of incoming messages - * is suspended and it is safe to access debuggee memory, plant breakpoints, etc. - * 'mem' is memory context, only threads that belong to that memory are checked. - * if 'mem' = NULL, check all threads. + * 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. */ -extern int is_all_stopped(Context * mem); +extern int is_all_stopped(Context * ctx); /* * Terminate debug context - thread or process. |