1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

Bug 415094 – Update Step Into Selection JUnit tests

Change-Id: I4e5a0afd8fc47444a3360f56650ebe966d837e04
Reviewed-on: https://git.eclipse.org/r/13840
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2013-08-14 13:40:40 -04:00
parent ca5586f8be
commit c95780a092
48 changed files with 946 additions and 663 deletions

View file

@ -1,10 +0,0 @@
BreakpointTestApp.exe
CatchpointTestApp.exe
ExpressionTestApp.exe
GDBMIGenericTestApp.exe
LaunchConfigurationAndRestartTestApp.exe
MemoryTestApp.exe
MultiThread.exe
SpecialTestApp.exe
TracepointTestApp.exe
core

View file

@ -1,49 +0,0 @@
using namespace std;
#include<string>
//#include<>
//The 'Component' node
class Artifact {
public:
Artifact(string name) {
fName = name;
fParent = NULL;
}
//Exercising Polymorphysm
virtual void print() = 0;
virtual string toString() = 0;
virtual void print(char& padc) = 0;
virtual string toString(char& padc) = 0;
string getName() {
return fName;
}
string getLocation() {
return fPath + "/" + fName;
}
virtual void setParent(Artifact &parent) {
fPath = parent.getLocation();
fParent = &parent;
}
void deleteParent() {
fPath = "";
fParent = NULL;
}
virtual ~Artifact() {
}
protected:
string fName;
string fPath;
Artifact* fParent;
private:
Artifact();
};

View file

@ -1,210 +0,0 @@
/*
* Composite Pattern
*/
#include<iostream>
#include<string>
#include<vector>
#include "Leaf.cc"
using namespace std;
//The 'Composite' node
class CompositeNode: public Artifact {
public:
CompositeNode(string name) :
Artifact(name) {
}
void Add(Artifact* child) {
child->setParent(*this);
fChildren.push_back(child);
}
void setParent(Artifact &parent) {
fPath = parent.getLocation();
fParent = &parent;
//Refresh the parent information path to all children
vector<Artifact*>::iterator it = fChildren.begin();
while (it != fChildren.end()) {
Artifact* child = *it;
child->setParent(*this);
++it;
}
}
void Remove(Artifact* child) {
child->deleteParent();
vector<Artifact*>::iterator it = fChildren.begin();
while (it != fChildren.end()) {
if (*it == child) {
delete child;
fChildren.erase(it);
break;
}
++it;
}
}
void print() {
cout << getLocation() << endl;
vector<Artifact*>::iterator it = fChildren.begin();
while (it != fChildren.end()) {
(*it)->print();
++it;
}
}
void print(char& cpad) {
string padding(fPath.length(), cpad);
cout << padding << "+ " << fName << endl;
vector<Artifact*>::iterator it = fChildren.begin();
while (it != fChildren.end()) {
(*it)->print(cpad);
++it;
}
}
string toString() {
string strAccumulator(getLocation() + "\n");
vector<Artifact*>::iterator it = fChildren.begin();
while (it != fChildren.end()) {
strAccumulator.append((*it)->toString());
++it;
}
return strAccumulator;
}
string toString(char& cpad) {
string strAccumulation(fPath.length(), cpad);
strAccumulation.append("+ " + fName + "\n");
vector<Artifact*>::iterator it = fChildren.begin();
while (it != fChildren.end()) {
strAccumulation.append((*it)->toString(cpad));
++it;
}
return strAccumulation;
}
virtual int getArtifactsSize() {
return fChildren.size();
}
virtual Artifact* getArtifact(int index) {
if (index < fChildren.size()) {
return fChildren.at(index);
}
else
return 0;
}
virtual Artifact* getArtifact(string description) {
vector<Artifact*>::iterator it = fChildren.begin();
while (it != fChildren.end()) {
if ((*it)->getName().compare(description)) {
return *it;
}
++it;
}
return 0;
}
virtual ~CompositeNode() {
while (!fChildren.empty()) {
vector<Artifact*>::iterator it = fChildren.begin();
delete *it;
fChildren.erase(it);
}
}
private:
CompositeNode();
vector<Artifact*> fChildren;
};
//The Main method
int main() {
//Create a tree root
CompositeNode* root = new CompositeNode("Dogs");
//Create composite nodes
CompositeNode* comp = new CompositeNode("Companion");
comp->Add(new LeafNode("Puddle"));
comp->Add(new LeafNode("Bichon"));
CompositeNode* sport = new CompositeNode("Guardian");
sport->Add(new LeafNode("Boxer"));
sport->Add(new LeafNode("Rottweiler"));
sport->Add(new LeafNode("Mastiff"));
//Create a Branch
CompositeNode* gun = new CompositeNode("Gun");
gun->Add(new LeafNode("Cocker"));
gun->Add(new LeafNode("Pointer"));
gun->Add(new LeafNode("Golden Retriever"));
CompositeNode* herd = new CompositeNode("Herding");
herd->Add(new LeafNode("Cattle dog"));
herd->Add(new LeafNode("Sheepdog"));
CompositeNode* north = new CompositeNode("Northern");
north->Add(new LeafNode("Akita"));
north->Add(new LeafNode("Chow Chow"));
CompositeNode* hound = new CompositeNode("Hound");
hound->Add(new LeafNode("Basset Hound"));
hound->Add(new LeafNode("Beagle"));
CompositeNode* terrier = new CompositeNode("Terrier");
terrier->Add(new LeafNode("Bull Terrier"));
terrier->Add(new LeafNode("Border Terrier"));
//Create some leaf nodes
LeafNode* pe1 = new LeafNode("German Shepperd");
LeafNode* pe2 = new LeafNode("Great Dane");
//Add nodes to start from the same root
root->Add(comp);
root->Add(sport);
root->Add(gun);
root->Add(herd);
root->Add(north);
root->Add(hound);
root->Add(terrier);
//Add leaf nodes to root
root->Add(pe1);
root->Add(pe2);
char cpad = '-';
char cpad2 = '_';
//Test stub + toString variants
if (root->getArtifactsSize() > 0
&& (root->getArtifact(0) != 0 && (root->getArtifact("Bichon") != 0))) {
string sout = root->getArtifact(0)->toString() + "\n" + root->getArtifact(1)->toString(cpad2);
cout << sout << endl;
}
//Test Remove primitive elements
root->Remove(pe1);
root->Remove(pe2);
//Test Print variants
root->getArtifact(2)->print(); root->getArtifact(3)->print(cpad);
//Test toString all
cout << "\n\nAll Tree\n" + root->toString(cpad);
//delete the allocated memory
delete root;
return 0;
}

View file

@ -1,38 +0,0 @@
#include<iostream>
#include<string>
#include "Artifact.cc"
//The 'Leaf' class
class LeafNode: public Artifact {
public:
LeafNode(string name) :
Artifact(name) {
}
void print() {
cout << getLocation() << endl;
}
void print(char& cpad) {
string padding(fPath.length(), cpad);
cout << padding << " " << fName << endl;
}
string toString() {
return getLocation() + "\n";
}
string toString(char& cpad) {
string padding(fPath.length(), cpad);
string rstr = padding + " " + fName + "\n";
return rstr;
}
virtual ~LeafNode() {
}
private:
LeafNode();
};

View file

@ -0,0 +1,7 @@
//
////
//
int value() {
int a = 1; // Must be at line 5
return 1;
}

View file

@ -0,0 +1,105 @@
#include "StepIntoSelection.h"
//
//
//
//
//
//
//
// The first line of the below method must be at line 10
int foo() {
int i = 0; // The tests expect this to be at line 11
return 1;
}
//
//
//
//
//
int bar(int i) {
int b = 0; // The tests expect this to be at line 20
return i + b;
}
//
//
//
//
//
//
int add(int a) {
return a + 1; // The tests expect this to be at line 30
}
//
//
int add() {
return 1; // The tests expect this to be at line 35
}
int recursiveTest(int a) {
if (a == 1) return a;
return a + recursiveTest(--a); // The test expects this line to be exactly 2 lines below the first line of the method
}
int sameLineTest() {
foo();
return 0;
}
int sameLineBreakpointTest() {
bar(foo());
return 0;
}
int doubleMethodTest() {
int a = 0;
bar(foo()); // The test expects this line to be one line below the star of the method
return 0;
}
int laterLineTest() {
int i = 0;
i++;
i++;
foo(); // The test expects this line to be exactly 3 lines below the first line of the method
i++;
i++;
return 0;
}
int laterLineNotHitTest() {
int i = 0;
if (i==100) { // Won't hit
foo(); // The test expects this line to be exactly 2 lines below the first line of the method
}
i++;
i++;
return 0;
}
int laterLineDifferentFileTest() {
int b = 0;
value(); // Must be one line below start of the method
// value() is from .h header file
}
int differentFileTest() {
return 0;
}
int methodWithDiffArgsNumberTest() {
return add() + add(2);
}
int main() {
sameLineTest();
laterLineTest();
laterLineNotHitTest();
doubleMethodTest();
recursiveTest(8);
laterLineDifferentFileTest();
differentFileTest();
methodWithDiffArgsNumberTest();
return 0;
}

View file

@ -402,6 +402,22 @@ public class SyncUtil {
return query.get(500, TimeUnit.MILLISECONDS);
}
public static Integer getStackDepth(final IExecutionDMContext execCtx) throws Throwable {
return getStackDepth(execCtx, 0);
}
public static Integer getStackDepth(final IExecutionDMContext execCtx, final int maxDepth) throws Throwable {
Query<Integer> query = new Query<Integer>() {
@Override
protected void execute(final DataRequestMonitor<Integer> rm) {
fStack.getStackDepth(execCtx, maxDepth, rm);
}
};
fSession.getExecutor().execute(query);
return query.get(500, TimeUnit.MILLISECONDS);
}
public static IFrameDMData getFrameData(final IExecutionDMContext execCtx, final int level) throws Throwable {
Query<IFrameDMData> query = new Query<IFrameDMData>() {
@Override

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* Copyright (c) 2009, 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -18,6 +18,8 @@ import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.Suite_7_1;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.Suite_7_2;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.Suite_7_3;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.Suite_7_4;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5.Suite_7_5;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6.Suite_7_6;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@ -32,6 +34,8 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
Suite_7_6.class,
Suite_7_5.class,
Suite_7_4.class,
Suite_7_3.class,
Suite_7_2.class,

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* Copyright (c) 2009, 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -18,6 +18,8 @@ import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.Suite_Remote_7_1;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.Suite_Remote_7_2;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.Suite_Remote_7_3;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.Suite_Remote_7_4;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5.Suite_Remote_7_5;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6.Suite_Remote_7_6;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@ -32,6 +34,8 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
Suite_Remote_7_6.class,
Suite_Remote_7_5.class,
Suite_Remote_7_4.class,
Suite_Remote_7_3.class,
Suite_Remote_7_2.class,

View file

@ -1,47 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.dsf.mi.service.command.commands.Suite_Sessionless_Tests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit suites we
* want to run. When creating a new suite class, it should be
* added to the list below.
*
* This suite runs the tests with the current version of GDB that is on the PATH
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
LaunchUtilsTest.class,
MIRegistersTest.class,
MIRunControlTest.class,
MIRunControlTargetAvailableTest.class,
MIExpressionsTest.class,
MIMemoryTest.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest.class,
GDBProcessesTest.class,
LaunchConfigurationAndRestartTest.class,
OperationsWhileTargetIsRunningTest.class,
PostMortemCoreTest.class,
CommandTimeoutTest.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest.class,
/* Add your suite class here */
})
public class AllTests {}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* Copyright (c) 2012, 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5.Suite_7_5;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6.Suite_7_6;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@ -21,7 +21,7 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
Suite_7_5.class,
Suite_7_6.class,
// Can't run the Remote test just yet because they
// have the same names on the local tests, which is
// not handled by JUnit (https://bugs.eclipse.org/172256)

View file

@ -10,32 +10,27 @@
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import javax.naming.OperationNotSupportedException;
import java.util.concurrent.TimeUnit;
import org.eclipse.cdt.core.model.IFunctionDeclaration;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.Query;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
import org.eclipse.cdt.dsf.debug.service.IRunControl3;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
import org.eclipse.cdt.dsf.mi.service.MIProcesses;
import org.eclipse.cdt.dsf.mi.service.command.events.MILocationReachedEvent;
import org.eclipse.cdt.dsf.mi.service.command.events.IMIDMEvent;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.mi.service.command.output.MIFrame;
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.internal.core.model.FunctionDeclaration;
import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
@ -53,58 +48,30 @@ import org.junit.runner.RunWith;
public class StepIntoSelectionTest extends BaseTestCase {
private DsfServicesTracker fServicesTracker;
private DsfSession fSession;
private IGDBControl fGDBCtrl;
private IRunControl3 fRunCtrl;
private IContainerDMContext fContainerDmc;
private IExecutionDMContext fThreadExecDmc;
/*
* Path to executable
*/
private static final String EXEC_PATH = "data/launch/bin/";
/*
* Name of the executable
*/
private static final String BIN_COMPOSITE = "Composite.exe";
// Composite Locations
private static final String SRC_COMPOSITE = "Composite.cc";
private static final int COMPOSITE_GETARTIFACTSIZE_LINE_1 = 97;
private static final int COMPOSITE_GETARTIFACT_LINE_1 = 101;
private static final int COMPOSITE_MAIN_LINE_S5 = 89;
private static final int COMPOSITE_MAIN_LINE_M1 = 190;
private static final int COMPOSITE_MAIN_LINE_M2 = 191;
private static final int COMPOSITE_MAIN_LINE_L1 = 192;
private static final int COMPOSITE_MAIN_LINE_L2 = 197;
private static final int COMPOSITE_MAIN_LINE_L3 = 201;
private static final int COMPOSITE_MAIN_LINE_L4 = 204;
private static final int COMPOSITE_TOSTRING_LINE_1 = 72;
private static final int COMPOSITE_TOSTRING_C_LINE_1 = 84;
private static final String COMPOSITE_GETARTIFACTSIZE = "getArtifactsSize";
private static final String COMPOSITE_GETARTIFACT = "getArtifact";
private static final String COMPOSITE_TOSTRING = "toString";
// Artifact Locations
private static final String ARTIFACT_GETLOCATION = "getLocation";
private static final int ARTIFACT_GETLOCATION_LINE_1 = 26;
// Leaf Locations
private static final String SRC_LEAF = "Leaf.cc";
private static final int LEAF_PRINT_LINE_1 = 14;
private static final String SRC_FILE = "StepIntoSelectionTestApp.cc";
private static final String HDR_FILE = "StepIntoSelection.h";
private static final int FOO_LINE = 11;
private static final int BAR_LINE = 20;
private static final int VALUE_LINE = 5;
private static final int ADD_WITH_ARG_LINE = 30;
private static final int ADD_NO_ARG_LINE = 35;
//Target Functions
private final static FunctionDeclaration funcCompGetArtifactSize = new FunctionDeclaration(null, COMPOSITE_GETARTIFACTSIZE);
private final static FunctionDeclaration funcCompGetArtifact_i = new FunctionDeclaration(null, COMPOSITE_GETARTIFACT);
private final static FunctionDeclaration funcArtifactGetLocation = new FunctionDeclaration(null, ARTIFACT_GETLOCATION);
private final static FunctionDeclaration funcCompToString = new FunctionDeclaration(null, COMPOSITE_TOSTRING);
private final static FunctionDeclaration funcCompToString_c = new FunctionDeclaration(null, COMPOSITE_TOSTRING);
private final static FunctionDeclaration funcFoo = new FunctionDeclaration(null, "foo");
private final static FunctionDeclaration funcBar = new FunctionDeclaration(null, "bar");
private final static FunctionDeclaration funcRecursive = new FunctionDeclaration(null, "recursiveTest");
private final static FunctionDeclaration funcValue = new FunctionDeclaration(null, "value");
private final static FunctionDeclaration funcAddNoArg = new FunctionDeclaration(null, "add");
private final static FunctionDeclaration funcAddWithArg = new FunctionDeclaration(null, "add");
static {
funcCompGetArtifact_i.setParameterTypes(new String[]{"int"});
funcCompToString_c.setParameterTypes(new String[]{"Char&"});
funcBar.setParameterTypes(new String[]{"int"});
funcRecursive.setParameterTypes(new String[]{"int"});
funcAddWithArg.setParameterTypes(new String[]{"int"});
}
class ResultContext {
@ -129,23 +96,15 @@ public class StepIntoSelectionTest extends BaseTestCase {
public void doBeforeTest() throws Exception {
super.doBeforeTest();
final DsfSession session = getGDBLaunch().getSession();
Runnable runnable = new Runnable() {
@Override
public void run() {
fServicesTracker = new DsfServicesTracker(TestsPlugin.getBundleContext(), session.getId());
fGDBCtrl = fServicesTracker.getService(IGDBControl.class);
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
IProcessDMContext procDmc = procService.createProcessContext(fGDBCtrl.getContext(), MIProcesses.UNIQUE_GROUP_ID);
fContainerDmc = procService.createContainerContext(procDmc, MIProcesses.UNIQUE_GROUP_ID);
IThreadDMContext threadDmc = procService.createThreadContext(procDmc, "1");
fThreadExecDmc = procService.createExecutionContext(fContainerDmc, threadDmc, "1");
fServicesTracker = new DsfServicesTracker(TestsPlugin.getBundleContext(), fSession.getId());
fRunCtrl = fServicesTracker.getService(IRunControl3.class);
}
};
session.getExecutor().submit(runnable).get();
fSession = getGDBLaunch().getSession();
fSession.getExecutor().submit(runnable).get();
}
@Override
@ -158,238 +117,389 @@ public class StepIntoSelectionTest extends BaseTestCase {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + BIN_COMPOSITE);
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/StepIntoSelectionTestApp.exe");
}
private IExecutionDMContext gdbRunToStartLine(String sourceName, int targetLine, ServiceEventWaitor<MIStoppedEvent> waitor) throws Throwable {
// run gdb to the specified line an resolve the execution context where the MI signal events are being processed
SyncUtil.runToLine(fThreadExecDmc, sourceName, Integer.toString(targetLine), true);
MILocationReachedEvent locEvent = waitor.waitForEvent(MILocationReachedEvent.class, TestsPlugin.massageTimeout(500));
return locEvent.getDMContext();
}
private void validateLocation(ISuspendedDMEvent suspendedEvent, String expectedFunction,
String expectedFile, int expectedLine, int expectedDepth) throws Throwable {
assertNotNull(suspendedEvent);
private MIStoppedEvent getLastEvent(ServiceEventWaitor<MIStoppedEvent> gdbStopListener) {
// Fetch the last stopped event as stepping into selection needs to step several times.
MIStoppedEvent event = null;
// Run until Timeout exception i.e. no more events in the queue
try {
while (true) {
// Wait or fetch the next stopped event in the queue
event = gdbStopListener.waitForEvent(MIStoppedEvent.class, TestsPlugin.massageTimeout(500));
}
} catch (Exception e) {
assertTrue("Exception: " + e.getMessage(), e.getMessage().contains("Timed out"));
}
assertTrue("Expected suspended event to be IMIDMEvent, but it was not.", suspendedEvent instanceof IMIDMEvent);
Object miEvent = ((IMIDMEvent)suspendedEvent).getMIEvent();
return event;
}
assertTrue("Expected mi event to be MIStoppedEvent, but it was not.", miEvent instanceof MIStoppedEvent);
MIStoppedEvent stoppedEvent = (MIStoppedEvent)miEvent;
private void validateLocation(IExecutionDMContext exeContext, MIFrame frame, String funcName) throws Throwable {
// Validate that the frame received is at the specified location
assertTrue(frame.getFunction().endsWith(funcName));
// Validate that the last stopped frame received is at the specified location
MIFrame frame = stoppedEvent.getFrame();
assertTrue("Not inside the expected function. Expected " +
expectedFunction + " but got " +
frame.getFunction(),
frame.getFunction().endsWith(expectedFunction));
assertEquals(expectedLine, frame.getLine());
// Validate that GDB is in sync at the specified location
IFrameDMData gdbFrame = SyncUtil.getFrameData(exeContext, 0);
assertTrue(gdbFrame.getFunction().endsWith(funcName));
assertTrue("Not inside the expected file. Expected " +
expectedFile + " but got " + frame.getFile(),
frame.getFile().endsWith(expectedFile));
int newDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
assertEquals(expectedDepth, newDepth);
checkGdbIsSuspended();
}
private void checkGdbIsSuspended() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
final IContainerDMContext containerDmc = SyncUtil.getContainerContext();
// Execution shall be suspended
fRunCtrl.getExecutor().submit(new Runnable() {
Query<Boolean> query = new Query<Boolean>() {
@Override
public void run() {
wait.setReturnInfo(fRunCtrl.isSuspended(containerDmc));
wait.waitFinished();
protected void execute(DataRequestMonitor<Boolean> rm) {
rm.done(fRunCtrl.isSuspended(containerDmc));
}
});
};
fSession.getExecutor().execute(query);
wait.waitUntilDone(TestsPlugin.massageTimeout(5000));
assertTrue("Target is running. It should have been suspended", (Boolean) wait.getReturnInfo());
wait.waitReset();
}
private void triggerRunToLine(final IExecutionDMContext exeContext, final String sourceName, final int targetLine) throws InterruptedException {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
fRunCtrl.getExecutor().submit(new Runnable() {
@Override
public void run() {
fRunCtrl.runToLine(exeContext, sourceName, targetLine, true, new RequestMonitor(fRunCtrl.getExecutor(), null) {
@Override
protected void handleCompleted() {
wait.waitFinished(getStatus());
}
});
}
});
wait.waitUntilDone(TestsPlugin.massageTimeout(10000));
wait.waitReset();
}
private void triggerStepIntoSelection(final IExecutionDMContext exeContext, final String sourceName, final int targetLine, final IFunctionDeclaration function, final boolean skipBreakPoints) throws InterruptedException {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
final OperationNotSupportedException[] exception = new OperationNotSupportedException[1];
// Trigger Stepping into a specified 'function' on the current line
fRunCtrl.getExecutor().submit(new Runnable() {
@Override
public void run() {
fRunCtrl.stepIntoSelection(exeContext, sourceName, targetLine, skipBreakPoints, function, new RequestMonitor(fRunCtrl.getExecutor(), null) {
@Override
protected void handleCompleted() {
wait.waitFinished(getStatus());
}
});
}
});
wait.waitUntilDone(TestsPlugin.massageTimeout(10000));
wait.waitReset();
if (exception[0] != null) {
fail("Step into selection failed: " + exception[0].getMessage());
}
}
private ResultContext runToLine(IExecutionDMContext exeContext, String sourceName, int runToLine) throws Throwable {
DsfSession session = getGDBLaunch().getSession();
ServiceEventWaitor<MIStoppedEvent> gdbStopListener = new ServiceEventWaitor<MIStoppedEvent>(session, MIStoppedEvent.class);
// Trigger Run to line
triggerRunToLine(exeContext, sourceName, runToLine);
// Fetch the last stopped event as stepping into selection needs to step several times.
MIStoppedEvent event = gdbStopListener.waitForEvent(MIStoppedEvent.class, TestsPlugin.massageTimeout(500));
assertNotNull(event);
// Validate that the last stopped frame received is at the specified location
MIFrame frame = event.getFrame();
assertTrue(frame.getLine() == runToLine);
return new ResultContext(event, exeContext);
}
private ResultContext stepIntoSelectionBase(String sourceName, int runToLine, IFunctionDeclaration targetFunction) throws Throwable {
return stepIntoSelectionBase(sourceName, runToLine, targetFunction, true, true, null);
}
private ResultContext stepIntoSelectionBase(String sourceName, int runToLine, IFunctionDeclaration targetFunction, boolean validateLocation, boolean skipBreakPoints, IExecutionDMContext dmc) throws Throwable {
DsfSession session = getGDBLaunch().getSession();
ServiceEventWaitor<MIStoppedEvent> gdbStopListener = new ServiceEventWaitor<MIStoppedEvent>(session, MIStoppedEvent.class);
final IExecutionDMContext exeContext;
if (dmc == null) {
exeContext = gdbRunToStartLine(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_M1, gdbStopListener);
} else {
exeContext = dmc;
}
// Run to an initial line an resolve the execution context where the MI signal events are being processed
assertNotNull(exeContext);
// Trigger Stepping into a specified 'function' and several lines below the current one
triggerStepIntoSelection(exeContext, sourceName, runToLine, targetFunction, skipBreakPoints);
// Fetch the last stopped event as stepping into selection needs to step several times.
MIStoppedEvent event = getLastEvent(gdbStopListener);
assertNotNull(event);
// Validate that the last stopped frame received is at the specified location
MIFrame frame = event.getFrame();
if (validateLocation) {
validateLocation(exeContext, frame, targetFunction.getElementName());
}
checkGdbIsSuspended();
return new ResultContext(event, exeContext);
}
@Test
public void stepIntoSelection() throws Throwable {
ResultContext result = stepIntoSelectionBase(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_M1, funcCompGetArtifactSize);
int currentLine = result.getEvent().getFrame().getLine();
assertTrue(currentLine == COMPOSITE_GETARTIFACTSIZE_LINE_1);
}
@Test
public void stepIntoSelectionWithRunToLine() throws Throwable {
ResultContext result = stepIntoSelectionBase(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_M2, funcCompGetArtifact_i);
int currentLine = result.getEvent().getFrame().getLine();
assertTrue(currentLine == COMPOSITE_GETARTIFACT_LINE_1);
}
@Test
public void withSelectedLineOnDifferentFile() throws Throwable {
ResultContext result = stepIntoSelectionBase(SRC_LEAF, LEAF_PRINT_LINE_1, funcArtifactGetLocation);
int currentLine = result.getEvent().getFrame().getLine();
assertTrue(currentLine == ARTIFACT_GETLOCATION_LINE_1);
boolean suspended = query.get(TestsPlugin.massageTimeout(5000), TimeUnit.SECONDS);
assertTrue("Target is running. It should have been suspended", suspended);
}
/**
* A break point is found before reaching search line
*
* @throws Throwable
* Perform a stepIntoSelection operation and return the SuspendedEvent indicating the
* stepInto has been completed.
*/
@Test
public void doNotSkipBreakPoints() throws Throwable {
// insert a break point before the run to line
SyncUtil.addBreakpoint(SRC_COMPOSITE + ":" + COMPOSITE_MAIN_LINE_L2);
//trigger step into selection skip break points is set to false
ResultContext result = stepIntoSelectionBase(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_L4, funcCompToString_c, false, false, null);
MIStoppedEvent event = result.getEvent();
int currentLine = event.getFrame().getLine();
//validate location, it shall not reach the step to selection line but the break point line instead.
assertTrue(currentLine == COMPOSITE_MAIN_LINE_L2);
//Make sure the step to selection operation is no longer active by triggering a second run to line before the step into selection line
result = runToLine(result.getContext(), SRC_COMPOSITE, COMPOSITE_MAIN_LINE_L3);
event = result.getEvent();
currentLine = event.getFrame().getLine();
//validate location, did not reached the step to selection line but the break point
assertTrue(currentLine == COMPOSITE_MAIN_LINE_L3);
private ISuspendedDMEvent triggerStepIntoSelection(final IExecutionDMContext exeContext,
final String sourceName,
final int targetLine,
final IFunctionDeclaration function,
final boolean skipBreakPoints)
throws Throwable {
ServiceEventWaitor<ISuspendedDMEvent> eventWaitor =
new ServiceEventWaitor<ISuspendedDMEvent>(fSession, ISuspendedDMEvent.class);
Query<Object> query = new Query<Object>() {
@Override
protected void execute(DataRequestMonitor<Object> rm) {
fRunCtrl.stepIntoSelection(exeContext, sourceName, targetLine, skipBreakPoints, function, rm);
}
};
fSession.getExecutor().execute(query);
query.get();
return eventWaitor.waitForEvent(TestsPlugin.massageTimeout(10000));
}
/**
* Perform a stepIntoSelection operation and return the SuspendedEvent indicating the
* stepInto has been completed.
*/
private ISuspendedDMEvent triggerRunToLine(final IExecutionDMContext exeContext,
final String sourceName,
final int targetLine,
final boolean skipBreakPoints)
throws Throwable {
ServiceEventWaitor<ISuspendedDMEvent> eventWaitor =
new ServiceEventWaitor<ISuspendedDMEvent>(fSession, ISuspendedDMEvent.class);
Query<Object> query = new Query<Object>() {
@Override
protected void execute(DataRequestMonitor<Object> rm) {
fRunCtrl.runToLine(exeContext, sourceName, targetLine, skipBreakPoints, rm);
}
};
fSession.getExecutor().execute(query);
query.get();
return eventWaitor.waitForEvent(TestsPlugin.massageTimeout(10000));
}
/**
* This test verifies that we can step into a selection on the same line as where we are currently.
*/
@Test
public void atSameLine() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("sameLineTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcFoo;
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
stoppedEvent.getFrame().getLine(), targetFunction, false);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
}
/**
* This test verifies that we can step into a selection from a later line than where we are currently.
*/
@Test
public void atLaterLine() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("laterLineTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcFoo;
int line = stoppedEvent.getFrame().getLine() + 3; // The method to stepInto is three lines below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
}
/**
* This test verifies that we can step into a selection of a different file.
*/
@Test
public void atLaterLineOnDifferentFile() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("laterLineDifferentFileTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcValue;
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false);
validateLocation(suspendedEvent, targetFunction.getElementName(), HDR_FILE, VALUE_LINE, originalDepth + 1);
}
/**
* This test verifies that we can step into a selection than has two method calls.
* We try to step into the deepest call.
*/
@Test
public void atDoubleMethodDeepCall() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("doubleMethodTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcFoo;
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
}
/**
* This test verifies that we can step into a selection than has two method calls.
* We try to step into the most shallow call.
*/
@Test
public void atDoubleMethodShalowCall() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("doubleMethodTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcBar;
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, BAR_LINE, originalDepth + 1);
}
/**
* This test verifies that we can step into a recursive method.
*/
@Test
public void recursiveMethod() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("recursiveTest");
int finalLine = stoppedEvent.getFrame().getLine();
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcRecursive;
int line = stoppedEvent.getFrame().getLine() + 2; // The method to stepInto is two lines below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, finalLine, originalDepth + 1);
}
/**
* This test verifies that if we try to step into a selection from an earlier line we will end up
* stopping at the first breakpoint that hits.
*/
@Test
public void atPreviousLine() throws Throwable {
String functionName = "laterLineTest";
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation(functionName);
int originalLine = stoppedEvent.getFrame().getLine();
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
// Step past the function call
stoppedEvent = SyncUtil.step(4, StepType.STEP_OVER);
// Set a bp one line below. We will check that this breakpoint hits when a stepInto is done
int bpline = originalLine + 4 + 1;
SyncUtil.addBreakpoint(Integer.toString(bpline));
FunctionDeclaration targetFunction = funcFoo;
int line = originalLine + 3; // The method to stepInto is three lines below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false);
validateLocation(suspendedEvent, functionName, SRC_FILE, bpline, originalDepth);
}
/**
* This test verifies that if we try to step into a selection from a later line that we will not reach, we will end up
* stopping at the first breakpoint that hits.
*/
@Test
public void atLaterLineThatIsNotHit() throws Throwable {
String functionName = "laterLineNotHitTest";
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation(functionName);
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcFoo;
int line = stoppedEvent.getFrame().getLine() + 2; // The method to stepInto is two lines below the start of the method
// Except we'll never reach it
// Set a bp a couple of lines below. We will check that this breakpoint hits and the stepInto is cancelled
int bpline = line + 2;
SyncUtil.addBreakpoint(Integer.toString(bpline));
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false); // Don't skip breakpoints
validateLocation(suspendedEvent, functionName, SRC_FILE, bpline, originalDepth);
// Make sure the step to selection operation is no longer active by triggering a run to line before the step into selection line
suspendedEvent = triggerRunToLine(stoppedEvent.getDMContext(), SRC_FILE,
bpline + 1, false);
validateLocation(suspendedEvent, functionName, SRC_FILE, bpline + 1, originalDepth);
}
/**
* This test verifies that when specified, we stop at a breakpoint that is hit before the StepIntoSelection
* is completed.
*/
@Test
public void atLaterLineStopAtBreakpoint() throws Throwable {
String functionName = "laterLineTest";
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation(functionName);
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
int originalLine = stoppedEvent.getFrame().getLine();
// Set a breakpoint before the stepInto line
SyncUtil.addBreakpoint(Integer.toString(originalLine+1));
int line = originalLine + 3; // The method to stepInto is three lines below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, funcFoo, false);
validateLocation(suspendedEvent, functionName, SRC_FILE, originalLine + 1, originalDepth);
// Make sure the step to selection operation is no longer active by triggering a run to line before the step into selection line
suspendedEvent = triggerRunToLine(stoppedEvent.getDMContext(), SRC_FILE,
originalLine + 2, false);
validateLocation(suspendedEvent, functionName, SRC_FILE, originalLine + 2, originalDepth);
}
/**
* This test verifies that when specified, we ignore all breakpoints that are hit before the StepIntoSelection
* is completed.
*/
@Test
public void atLaterLineSkipBreakpoints() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("laterLineTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
int originalLine = stoppedEvent.getFrame().getLine();
// Set two breakpoints before the stepInto line
SyncUtil.addBreakpoint(Integer.toString(originalLine+1));
SyncUtil.addBreakpoint(Integer.toString(originalLine+2));
int line = originalLine + 3; // The method to stepInto is three lines below the start of the method
FunctionDeclaration targetFunction = funcFoo;
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, true);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
}
/**
* This test verifies that we will not stop at a breakpoint if it is in the middle
* of the step-in operations when the run-to-line skip breakpoint option is not selected.
*/
@Test
public void atDoubleMethodStopAtBreakpoint() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("doubleMethodTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
// Set a breakpoint inside foo, which will hit before our
// StepInto is finished
SyncUtil.addBreakpoint(Integer.toString(FOO_LINE));
FunctionDeclaration targetFunction = funcBar;
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, false); // Set not to skip breakpoints, but it should have no effect
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, BAR_LINE, originalDepth + 1);
}
/**
* This test verifies that we will not stop at a breakpoint if it is in the middle
* of the step-in operations even if the run-to-line skip breakpoint option is selected.
*/
@Test
public void atDoubleMethodSkipBreakpoint() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("doubleMethodTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
// Set a breakpoint inside foo, which will hit before our
// StepInto is finished
SyncUtil.addBreakpoint(Integer.toString(FOO_LINE));
FunctionDeclaration targetFunction = funcBar;
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
line, targetFunction, true); // Set skip breakpoints, which should have non impact
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, BAR_LINE, originalDepth + 1);
}
/**
* This test verifies that if we have two methods with the same name on the same line,
* we properly choose the method with the correct number of arguments based on the
* step into selection.
*/
@Test
public void diffMethodByArgsNumber() throws Throwable {
ResultContext result = stepIntoSelectionBase(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_L1, funcCompToString_c);
int currentLine = result.getEvent().getFrame().getLine();
assertTrue(currentLine == COMPOSITE_TOSTRING_C_LINE_1); //first line of toString(char& c)
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("methodWithDiffArgsNumberTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
FunctionDeclaration targetFunction = funcAddWithArg;
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
stoppedEvent.getFrame().getLine(), targetFunction, false);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, ADD_WITH_ARG_LINE, originalDepth + 1);
}
@Test
public void diffMethodByArgsNumber2() throws Throwable {
ResultContext result = stepIntoSelectionBase(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_L1, funcCompToString);
int currentLine = result.getEvent().getFrame().getLine();
assertTrue(currentLine == COMPOSITE_TOSTRING_LINE_1); //first line of toString()
}
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("methodWithDiffArgsNumberTest");
int originalDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext());
@Test
public void stepIntoRecursiveMethod() throws Throwable {
//Step to the recursive method
ResultContext result = stepIntoSelectionBase(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_L4, funcCompToString_c);
int currentLine = result.getEvent().getFrame().getLine();
assertTrue(currentLine == COMPOSITE_TOSTRING_C_LINE_1);
FunctionDeclaration targetFunction = funcAddNoArg;
// StepInto the method
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
stoppedEvent.getFrame().getLine(), targetFunction, false);
//Move away from the first line of the method to validate a successful recursive return to this location
int offset = 3;
result = runToLine(result.getContext(), SRC_COMPOSITE, COMPOSITE_TOSTRING_C_LINE_1 + offset);
currentLine = result.getEvent().getFrame().getLine();
assertTrue(currentLine == COMPOSITE_TOSTRING_C_LINE_1 + offset);
//Step into selection to trigger the recursive call
result = stepIntoSelectionBase(SRC_COMPOSITE, COMPOSITE_MAIN_LINE_S5, funcCompToString_c, false, false, result.getContext());
currentLine = result.getEvent().getFrame().getLine();
//Assert going back to the top of the same function
assertTrue(currentLine == COMPOSITE_TOSTRING_C_LINE_1);
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, ADD_NO_ARG_LINE, originalDepth + 1);
}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.StepIntoSelectionTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_6_6 extends StepIntoSelectionTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -44,6 +44,7 @@ import org.junit.runners.Suite;
PostMortemCoreTest_6_6.class,
Suite_Sessionless_Tests.class,
CommandTimeoutTest_6_6.class,
StepIntoSelectionTest_6_6.class,
/* Add your test class here */
})

View file

@ -43,6 +43,7 @@ import org.junit.runners.Suite;
OperationsWhileTargetIsRunningTest_6_6.class,
CommandTimeoutTest_6_6.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_6_6.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.StepIntoSelectionTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_6_7 extends StepIntoSelectionTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -44,6 +44,7 @@ import org.junit.runners.Suite;
PostMortemCoreTest_6_7.class,
CommandTimeoutTest_6_7.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_6_7.class,
/* Add your test class here */
})

View file

@ -43,6 +43,7 @@ import org.junit.runners.Suite;
OperationsWhileTargetIsRunningTest_6_7.class,
CommandTimeoutTest_6_7.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_6_7.class,
/* Add your test class here */
})

View file

@ -10,23 +10,15 @@
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.StepIntoSelectionTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.StepIntoSelectionTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_6_8 extends StepIntoSelectionTest {
public class StepIntoSelectionTest_6_8 extends StepIntoSelectionTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, false);
}
}

View file

@ -43,6 +43,7 @@ import org.junit.runners.Suite;
OperationsWhileTargetIsRunningTest_6_8.class,
CommandTimeoutTest_6_8.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_6_8.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.StepIntoSelectionTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_0 extends StepIntoSelectionTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -12,21 +12,14 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.StepIntoSelectionTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_0_NS extends StepIntoSelectionTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
public class StepIntoSelectionTest_7_0_NS extends StepIntoSelectionTest_7_0 {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, false);
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -47,8 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_0.class,
GDBMultiNonStopRunControlTest_7_0.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_0.class,
StepIntoSelectionTest_7_0_NS.class,
/* Add your test class here */
})

View file

@ -47,6 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_0.class,
GDBMultiNonStopRunControlTest_7_0.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_0.class,
StepIntoSelectionTest_7_0_NS.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.StepIntoSelectionTest_7_0;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_1 extends StepIntoSelectionTest_7_0 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_1_NS extends StepIntoSelectionTest_7_1 {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -47,6 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_1.class,
GDBMultiNonStopRunControlTest_7_1.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_1.class,
StepIntoSelectionTest_7_1_NS.class,
/* Add your test class here */
})

View file

@ -47,6 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_1.class,
GDBMultiNonStopRunControlTest_7_1.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_1.class,
StepIntoSelectionTest_7_1_NS.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.StepIntoSelectionTest_7_1;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_2 extends StepIntoSelectionTest_7_1 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_2_NS extends StepIntoSelectionTest_7_2 {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -47,6 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_2.class,
GDBMultiNonStopRunControlTest_7_2.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_2.class,
StepIntoSelectionTest_7_2_NS.class,
/* Add your test class here */
})

View file

@ -47,6 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_2.class,
GDBMultiNonStopRunControlTest_7_2.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_2.class,
StepIntoSelectionTest_7_2_NS.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.StepIntoSelectionTest_7_2;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_3 extends StepIntoSelectionTest_7_2 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3);
}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_3_NS extends StepIntoSelectionTest_7_3 {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -47,6 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_3.class,
GDBMultiNonStopRunControlTest_7_3.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_3.class,
StepIntoSelectionTest_7_3_NS.class,
/* Add your test class here */
})

View file

@ -47,6 +47,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_3.class,
GDBMultiNonStopRunControlTest_7_3.class,
Suite_Sessionless_Tests.class,
StepIntoSelectionTest_7_3.class,
StepIntoSelectionTest_7_3_NS.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.StepIntoSelectionTest_7_3;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_4 extends StepIntoSelectionTest_7_3 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4);
}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_4_NS extends StepIntoSelectionTest_7_4 {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -48,6 +48,8 @@ import org.junit.runners.Suite;
GDBMultiNonStopRunControlTest_7_4.class,
Suite_Sessionless_Tests.class,
GDBConsoleBreakpointsTest_7_4.class,
StepIntoSelectionTest_7_4.class,
StepIntoSelectionTest_7_4_NS.class,
/* Add your test class here */
})

View file

@ -49,6 +49,8 @@ import org.junit.runners.Suite;
Suite_Sessionless_Tests.class,
GDBConsoleBreakpointsTest_7_4.class,
TraceFileTest_7_4.class,
StepIntoSelectionTest_7_4.class,
StepIntoSelectionTest_7_4_NS.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.StepIntoSelectionTest_7_4;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_5 extends StepIntoSelectionTest_7_4 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5);
}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_5_NS extends StepIntoSelectionTest_7_5 {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -48,6 +48,8 @@ import org.junit.runners.Suite;
CommandTimeoutTest_7_5.class,
Suite_Sessionless_Tests.class,
GDBConsoleBreakpointsTest_7_5.class,
StepIntoSelectionTest_7_5.class,
StepIntoSelectionTest_7_5_NS.class,
/* Add your test class here */
})

View file

@ -49,6 +49,8 @@ import org.junit.runners.Suite;
Suite_Sessionless_Tests.class,
GDBConsoleBreakpointsTest_7_5.class,
TraceFileTest_7_5.class,
StepIntoSelectionTest_7_5.class,
StepIntoSelectionTest_7_5_NS.class,
/* Add your test class here */
})

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5.StepIntoSelectionTest_7_5;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_6 extends StepIntoSelectionTest_7_5 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_6);
}
}

View file

@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_6_NS extends StepIntoSelectionTest_7_6 {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -49,6 +49,8 @@ import org.junit.runners.Suite;
Suite_Sessionless_Tests.class,
GDBConsoleBreakpointsTest_7_6.class,
GDBConsoleSynchronizingTest_7_6.class,
StepIntoSelectionTest_7_6.class,
StepIntoSelectionTest_7_6_NS.class,
/* Add your test class here */
})

View file

@ -50,6 +50,8 @@ import org.junit.runners.Suite;
GDBConsoleBreakpointsTest_7_6.class,
TraceFileTest_7_6.class,
GDBConsoleSynchronizingTest_7_6.class,
StepIntoSelectionTest_7_6.class,
StepIntoSelectionTest_7_6_NS.class,
/* Add your test class here */
})