mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[246735] - [breakpoints] Selecting the breakpoint filter option hangs eclipse
This commit is contained in:
parent
10706627ba
commit
de5c1809ac
1 changed files with 19 additions and 18 deletions
|
@ -1504,8 +1504,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
private Set<String> extractThreads(IBreakpointsTargetDMContext context, ICBreakpoint breakpoint) {
|
private Set<String> extractThreads(IBreakpointsTargetDMContext context, ICBreakpoint breakpoint) {
|
||||||
|
|
||||||
// Find the ancestor
|
// Find the ancestor
|
||||||
IContainerDMContext targetContext = DMContexts.getAncestorOfType(context, IContainerDMContext.class);
|
List<IExecutionDMContext[]> threads = new ArrayList<IExecutionDMContext[]>(1);
|
||||||
IExecutionDMContext[] threads = null;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Retrieve the targets
|
// Retrieve the targets
|
||||||
|
@ -1513,31 +1512,33 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
IContainerDMContext[] targets = filterExtension.getTargetFilters();
|
IContainerDMContext[] targets = filterExtension.getTargetFilters();
|
||||||
|
|
||||||
// If no target is present, plant one...
|
// If no target is present, plant one...
|
||||||
if (targets.length == 0) {
|
// if (targets.length == 0) {
|
||||||
for (IBreakpointsTargetDMContext dmc : fPlatformBPs.keySet()) {
|
// for (IBreakpointsTargetDMContext dmc : fPlatformBPs.keySet()) {
|
||||||
IContainerDMContext ctx = DMContexts.getAncestorOfType(dmc, IContainerDMContext.class);
|
// IContainerDMContext ctx = DMContexts.getAncestorOfType(dmc, IContainerDMContext.class);
|
||||||
if (ctx == targetContext) {
|
// if (ctx == targetContext) {
|
||||||
filterExtension.setTargetFilter(ctx);
|
// filterExtension.setTargetFilter(ctx);
|
||||||
targets = filterExtension.getTargetFilters();
|
// targets = filterExtension.getTargetFilters();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Extract the thread IDs (if there is none, we are covered)
|
// Extract the thread IDs (if there is none, we are covered)
|
||||||
for (IContainerDMContext ctxt : targets) {
|
for (IContainerDMContext ctxt : targets) {
|
||||||
if (ctxt == targetContext) {
|
if (DMContexts.isAncestorOf(ctxt, context)) {
|
||||||
threads = filterExtension.getThreadFilters(ctxt);
|
threads.add(filterExtension.getThreadFilters(ctxt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (CoreException e1) {
|
} catch (CoreException e1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<String> results = new HashSet<String>();
|
Set<String> results = new HashSet<String>();
|
||||||
if ((threads != null) && (supportsThreads(breakpoint))) {
|
if (supportsThreads(breakpoint)) {
|
||||||
for (IExecutionDMContext thread : threads) {
|
for (IExecutionDMContext[] targetThreads : threads) {
|
||||||
if (thread instanceof IMIExecutionDMContext) {
|
for (IExecutionDMContext thread : targetThreads) {
|
||||||
IMIExecutionDMContext dmc = (IMIExecutionDMContext) thread;
|
if (thread instanceof IMIExecutionDMContext) {
|
||||||
results.add(((Integer) dmc.getThreadId()).toString());
|
IMIExecutionDMContext dmc = (IMIExecutionDMContext) thread;
|
||||||
|
results.add(((Integer) dmc.getThreadId()).toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue