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:
parent
52556fd541
commit
cbdc8d81d3
2 changed files with 15 additions and 2 deletions
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue