1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

For the stop on main breakpoint (a temporaro breakpoint) gdb 7.0 reports the stopped event with a reason=breakpoint. It provides no reason in gdb < 7.0.

This commit is contained in:
John Cortell 2010-04-09 22:44:45 +00:00
parent 52556fd541
commit cbdc8d81d3
2 changed files with 15 additions and 2 deletions

View file

@ -397,11 +397,18 @@ public class MIRunControlTest extends BaseTestCase {
/* /*
* getModelData should return StateChangeReason. * getModelData should return StateChangeReason.
*/ */
Assert.assertTrue(" State change reason for a normal execution should be USER_REQUEST instead of " + data.getStateChangeReason(), Assert.assertEquals("Unexpected state change reason.", getExpectedMainThreadStopReason(), data.getStateChangeReason());
StateChangeReason.USER_REQUEST == data.getStateChangeReason());
} }
} }
/**
* Allows subclasses to override the expected reason for the stop on main.
* @return
*/
protected StateChangeReason getExpectedMainThreadStopReason() {
return StateChangeReason.USER_REQUEST;
}
@Test @Test
public void getModelDataForThreadWhenStep() throws Throwable { public void getModelDataForThreadWhenStep() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();

View file

@ -11,6 +11,7 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest;
import org.junit.BeforeClass; import org.junit.BeforeClass;
@ -22,4 +23,9 @@ public class MIRunControlTest_7_0 extends MIRunControlTest {
public static void beforeClassMethod_7_0() { public static void beforeClassMethod_7_0() {
setGdbProgramNamesLaunchAttributes("7.0"); setGdbProgramNamesLaunchAttributes("7.0");
} }
@Override
protected StateChangeReason getExpectedMainThreadStopReason() {
return StateChangeReason.BREAKPOINT;
}
} }