Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-09-16 14:59:27 +0000
committereutarass2011-09-16 14:59:27 +0000
commit047b501ca79564b4acd4ccf5e6ed58c631b2ad13 (patch)
tree4704c03182f533243810a14c39c418bfe40af393
parent663a0d5c6da56a53d1abdbabe0604b3ecd87aecb (diff)
downloadorg.eclipse.tcf.agent-047b501ca79564b4acd4ccf5e6ed58c631b2ad13.tar.gz
org.eclipse.tcf.agent-047b501ca79564b4acd4ccf5e6ed58c631b2ad13.tar.xz
org.eclipse.tcf.agent-047b501ca79564b4acd4ccf5e6ed58c631b2ad13.zip
TCF Agent: fixed: ContextIds and ContextNames breakpoint properties don't work properly if memory context is not direct parent of the thread.
-rw-r--r--services/breakpoints.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/services/breakpoints.c b/services/breakpoints.c
index f96a8ee3..b0625a83 100644
--- a/services/breakpoints.c
+++ b/services/breakpoints.c
@@ -1101,10 +1101,10 @@ static int check_context_ids_condition(BreakpointInfo * bp, Context * ctx) {
if (bp->context_ids != NULL) {
int ok = 0;
char ** ids = bp->context_ids;
+ Context * prs = context_get_group(ctx, CONTEXT_GROUP_PROCESS);
while (!ok && *ids != NULL) {
- Context * c = id2ctx(*ids++);
- if (c == NULL) continue;
- ok = c == ctx || c == ctx->parent;
+ char * id = *ids++;
+ ok = strcmp(id, ctx->id) == 0 || (prs && strcmp(id, prs->id) == 0);
}
if (!ok) return 0;
}
@@ -1117,11 +1117,14 @@ static int check_context_ids_condition(BreakpointInfo * bp, Context * ctx) {
ok = strcmp(name, *names++) == 0;
}
}
- if (!ok && ctx->parent->name) {
- char * name = ctx->parent->name;
- char ** names = bp->context_names;
- while (!ok && *names != NULL) {
- ok = strcmp(name, *names++) == 0;
+ if (!ok) {
+ Context * prs = context_get_group(ctx, CONTEXT_GROUP_PROCESS);
+ if (prs && prs->name) {
+ char * name = prs->name;
+ char ** names = bp->context_names;
+ while (!ok && *names != NULL) {
+ ok = strcmp(name, *names++) == 0;
+ }
}
}
if (!ok) return 0;

Back to the top