Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorEugene Tarassov2019-11-11 19:59:55 +0000
committerEugene Tarassov2019-11-11 19:59:55 +0000
commit76ff32fc4eb1fc78489234f2ba9433b02c2fa5b4 (patch)
tree69f56c4e911a337a6e9ca782c38e79ca71c663e5 /agent
parentb27c40c90a76e4f7725ef7f8a23e2d1b49909871 (diff)
downloadorg.eclipse.tcf.agent-76ff32fc4eb1fc78489234f2ba9433b02c2fa5b4.tar.gz
org.eclipse.tcf.agent-76ff32fc4eb1fc78489234f2ba9433b02c2fa5b4.tar.xz
org.eclipse.tcf.agent-76ff32fc4eb1fc78489234f2ba9433b02c2fa5b4.zip
TCF Agent: fixed: handling of thread creation can cause assertion failure in breakpoint evaluation
Diffstat (limited to 'agent')
-rw-r--r--agent/tcf/services/breakpoints.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/tcf/services/breakpoints.c b/agent/tcf/services/breakpoints.c
index 4e2ec454..a77f3d2d 100644
--- a/agent/tcf/services/breakpoints.c
+++ b/agent/tcf/services/breakpoints.c
@@ -2946,7 +2946,7 @@ void evaluate_breakpoint(Context * ctx) {
Context * grp = context_get_group(ctx, CONTEXT_GROUP_BREAKPOINT);
EvaluationRequest * req = create_evaluation_request(grp);
int already_posted = !list_is_empty(&req->link_posted) || !list_is_empty(&req->link_active);
- int need_to_post = already_posted;
+ int need_to_post = already_posted || cache_enter_cnt > 0;
assert(context_has_state(ctx));
assert(ctx->stopped);
@@ -2970,14 +2970,14 @@ void evaluate_breakpoint(Context * ctx) {
else {
bi = find_instruction(mem, 0, mem_addr, CTX_BP_ACCESS_INSTRUCTION, 1);
}
- if (bi != NULL && bi->planted) {
- assert(bi->valid);
+ if (bi != NULL) {
for (i = 0; i < bi->ref_cnt; i++) {
if (bi->refs[i].ctx == grp) {
BreakpointInfo * bp = bi->refs[i].bp;
ConditionEvaluationRequest * c = add_condition_evaluation_request(req, ctx, bp, bi);
if (c == NULL) continue;
if (need_to_post) continue;
+ assert(bi->valid);
if (is_disabled(bp)) continue;
if (bp->condition != NULL || bp->stop_group != NULL || bp->temporary) {
need_to_post = 1;
@@ -2994,13 +2994,13 @@ void evaluate_breakpoint(Context * ctx) {
assert(ctx->stopped_by_cb[0] != NULL);
for (j = 0; ctx->stopped_by_cb[j]; j++) {
BreakInstruction * bi = (BreakInstruction *)((char *)ctx->stopped_by_cb[j] - offsetof(BreakInstruction, cb));
- assert(bi->planted);
for (i = 0; i < bi->ref_cnt; i++) {
if (bi->refs[i].ctx == grp) {
BreakpointInfo * bp = bi->refs[i].bp;
ConditionEvaluationRequest * c = add_condition_evaluation_request(req, ctx, bp, bi);
if (c == NULL) continue;
if (need_to_post) continue;
+ assert(bi->valid);
if (is_disabled(bp)) continue;
if (bp->condition != NULL || bp->stop_group != NULL || bp->temporary) {
need_to_post = 1;

Back to the top