diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleBreakpointsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleBreakpointsTest.java index c189091647e..cf6b3dbcbc5 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleBreakpointsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleBreakpointsTest.java @@ -320,10 +320,31 @@ public class GDBConsoleBreakpointsTest extends BaseTestCase { // Remove the platform breakpoint and verify that // the target breakpoint is deleted. deletePlatformBreakpoint(plBpt); - waitForBreakpointEvent(IBreakpointsRemovedEvent.class); - Assert.assertTrue(getPlatformBreakpointCount() == 0); + + // Don't fail right away if we don't get the breakpoint event + // as we can't tell the true cause. + // Let further checks happen to help figure things out. + + String failure = ""; + try { + waitForBreakpointEvent(IBreakpointsRemovedEvent.class); + } catch (Exception e) { + failure += e.getMessage(); + } + + int platformBp = getPlatformBreakpointCount(); + if (platformBp != 0) { + if (!failure.isEmpty()) failure += ", "; + failure += "Platform breakpoints remaining: " + platformBp; + } + miBpts = getTargetBreakpoints(); - Assert.assertTrue(miBpts.length == 0); + if (miBpts.length != 0) { + if (!failure.isEmpty()) failure += ", "; + failure += "Target breakpoints remaining: " + miBpts.length; + } + + Assert.assertTrue(failure, failure.isEmpty()); } private void setConsoleLineBreakpoint(String fileName, int lineNumber) throws Throwable {