Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-05-04 16:54:04 -0400
committerEugene Tarassov2013-05-04 16:54:04 -0400
commit1e5001dc2868309ee4347dfdc495aa78e9ba6355 (patch)
tree697458f6a24e797fe01985db950fe829bbd22e91
parent6929101d1cdacf541d0059696a3ebdf24db40e73 (diff)
downloadorg.eclipse.tcf.agent-1e5001dc2868309ee4347dfdc495aa78e9ba6355.tar.gz
org.eclipse.tcf.agent-1e5001dc2868309ee4347dfdc495aa78e9ba6355.tar.xz
org.eclipse.tcf.agent-1e5001dc2868309ee4347dfdc495aa78e9ba6355.zip
TCF Agent: fixed: stopped_by_cb list can contain invalid pointers after a breakpoint is removed
-rw-r--r--agent/tcf/services/breakpoints.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/agent/tcf/services/breakpoints.c b/agent/tcf/services/breakpoints.c
index 118ffc10..d6bb8509 100644
--- a/agent/tcf/services/breakpoints.c
+++ b/agent/tcf/services/breakpoints.c
@@ -350,6 +350,11 @@ static int remove_instruction(BreakInstruction * bi) {
}
else {
if (context_unplant_breakpoint(&bi->cb) < 0) return -1;
+ if (bi->cb.ctx->stopped_by_cb != NULL) {
+ ContextBreakpoint ** p = bi->cb.ctx->stopped_by_cb;
+ while (*p != NULL && *p != &bi->cb) p++;
+ while (*p != NULL && (*p = *(p + 1)) != NULL) p++;
+ }
}
bi->planted = 0;
bi->dirty = 0;

Back to the top