diff --git a/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF index 4bcbc34df4f..9e7108a543b 100644 --- a/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF +++ b/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF @@ -32,11 +32,12 @@ Export-Package: org.eclipse.cdt.debug.core, org.eclipse.cdt.debug.internal.core.executables;x-internal:=true, org.eclipse.cdt.debug.internal.core.model;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.dsf.gdb", org.eclipse.cdt.debug.internal.core.sourcelookup; - x-friends:="org.eclipse.cdt.dsf.ui, - org.eclipse.cdt.debug.edc, + x-friends:="org.eclipse.cdt.debug.edc, org.eclipse.cdt.debug.gdbjtag.core, + org.eclipse.cdt.dsf, org.eclipse.cdt.dsf.gdb, - org.eclipse.cdt.dsf", + org.eclipse.cdt.dsf.ui, + org.eclipse.cdt.tests.dsf.gdb", org.eclipse.cdt.debug.internal.core.srcfinder;x-internal:=true Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)", org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)", diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile index 38187687476..2ae5d155473 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile @@ -1,4 +1,5 @@ BINDIR = ../bin +BUILDDIR = ../build SRC_C = $(wildcard *.c) SRC_CXX = $(wildcard *.cc) @@ -12,8 +13,10 @@ COREFILE = $(BINDIR)/core CC = gcc CXX = g++ -CFLAGS = -g3 -O0 -CXXFLAGS = -g3 -O0 +# Uncomment the OLDDWARFFLAGS to run newer GCC against older GDB +# OLDDWARFFLAGS = -gdwarf-2 -gstrict-dwarf +CFLAGS = -g3 -O0 $(OLDDWARFFLAGS) +CXXFLAGS = -g3 -O0 $(OLDDWARFFLAGS) # Don't try to use pthread on Windows # The OS environment variable exists on Windows @@ -33,16 +36,25 @@ all: $(BINS) $(COREFILE) $(BINDIR): $(MKDIR) $@ -$(BINDIR)/%.exe: %.c $(HEADERS) | $(BINDIR) +$(BUILDDIR): + $(MKDIR) $@ + +$(BINDIR)/%.exe: %.c $(HEADERS) Makefile | $(BINDIR) $(CC) $(CFLAGS) -o $@ $< -$(BINDIR)/%.exe: %.cc $(HEADERS) | $(BINDIR) +$(BINDIR)/%.exe: %.cc $(HEADERS) Makefile | $(BINDIR) $(CXX) $(CXXFLAGS) -o $@ $< # Generate a core file that is needed for post-morted core-file tests -$(COREFILE): $(BINDIR)/ExpressionTestApp.exe | $(BINDIR) +$(COREFILE): $(BINDIR)/ExpressionTestApp.exe Makefile | $(BINDIR) gdb -nx --batch -ex 'b testLocals' -ex 'run' --ex 'next 16' \ -ex 'gcore ../bin/core' $(BINDIR)/ExpressionTestApp.exe > /dev/null +# Compile a source file from an alternate directory +$(BINDIR)/SourceLookup.exe: SourceLookup.cc $(HEADERS) Makefile | $(BINDIR) $(BUILDDIR) + cp SourceLookup.cc $(BUILDDIR)/SourceLookup.cc + cd $(BUILDDIR) && $(CXX) $(CXXFLAGS) -o $@ SourceLookup.cc + rm $(BUILDDIR)/SourceLookup.cc + clean: - $(RM) -r $(BINDIR) + $(RM) -r $(BINDIR) $(BUILDDIR) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/SourceLookup.cc b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/SourceLookup.cc new file mode 100644 index 00000000000..48b2bdcbaf5 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/SourceLookup.cc @@ -0,0 +1,17 @@ +#include +volatile int i; + +int func(void) { + i = 0; + i += 1; + i += 2; + return i; +} + + +int main() { + int calc = func(); + + printf("Calc: %d\n", calc); + return 0; +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java index 63651876695..554626dfce0 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java @@ -11,6 +11,7 @@ * Simon Marchi (Ericsson) - Make canRestart and restart throw Exception instead of Throwable. * Simon Marchi (Ericsson) - Add getThreadData. * Alvaro Sanchez-Leon (Ericsson AB) - [Memory] Make tests run with different values of addressable size (Bug 460241) + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.framework; @@ -53,6 +54,8 @@ import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData; 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.StepType; +import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext; +import org.eclipse.cdt.dsf.debug.service.ISourceLookup; import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext; import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData; import org.eclipse.cdt.dsf.debug.service.IStack.IVariableDMContext; @@ -96,6 +99,8 @@ public class SyncUtil { private static CommandFactory fCommandFactory; private static IGDBProcesses fProcessesService; + private static ISourceLookup fSourceLookup; + // Initialize some common things, once the session has been established public static void initialize(DsfSession session) throws Exception { fSession = session; @@ -113,6 +118,7 @@ public class SyncUtil { fProcessesService = tracker.getService(IGDBProcesses.class); fMemory = tracker.getService(IMemory.class); fCommandFactory = fGdbControl.getCommandFactory(); + fSourceLookup = tracker.getService(ISourceLookup.class); tracker.dispose(); } @@ -385,26 +391,33 @@ public class SyncUtil { } public static IFrameDMContext getStackFrame(final IExecutionDMContext execCtx, final int level) throws Exception { - Query query = new Query() { - @Override - protected void execute(final DataRequestMonitor rm) { - fStack.getFrames(execCtx, new ImmediateDataRequestMonitor(rm) { - @Override - protected void handleSuccess() { - if (getData().length > level) { - rm.setData(getData()[level]); - } else { - rm.setStatus(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, "Frame not available")); - } - rm.done(); - } - }); - } - }; + Query query = new Query() { + @Override + protected void execute(final DataRequestMonitor rm) { + fStack.getFrames(execCtx, level, level, new ImmediateDataRequestMonitor(rm) { + @Override + protected void handleSuccess() { + IFrameDMContext[] frameDmcs = getData(); + assert frameDmcs != null; + assert frameDmcs.length == 1; + rm.setData(frameDmcs[0]); + rm.done(); + } + }); + } + }; - fSession.getExecutor().execute(query); - return query.get(500, TimeUnit.MILLISECONDS); + fSession.getExecutor().execute(query); + return query.get(500, TimeUnit.MILLISECONDS); } + + /** + * Utility method to return a specific frame DM context. + */ + @ThreadSafeAndProhibitedFromDsfExecutor("fSession.getExecutor()") + public static IFrameDMContext getStackFrame(int threadIndex, final int level) throws Exception { + return getStackFrame(getExecutionContext(threadIndex), level); + } public static Integer getStackDepth(final IExecutionDMContext execCtx) throws Throwable { return getStackDepth(execCtx, 0); @@ -441,6 +454,10 @@ public class SyncUtil { fSession.getExecutor().execute(query); return query.get(500, TimeUnit.MILLISECONDS); } + + public static IFrameDMData getFrameData(final int threadId, final int level) throws Throwable { + return getFrameData(getExecutionContext(threadId), level); + } public static IThreadDMData getThreadData(final int threadId) throws InterruptedException, ExecutionException, TimeoutException { @@ -924,4 +941,25 @@ public class SyncUtil { return memoryService.isBigEndian(dmc) ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN; } + + /** + * Get the source using the {@link ISourceLookup} service. + * + * Wrapper around + * {@link ISourceLookup#getSource(ISourceLookupDMContext, String, DataRequestMonitor)} + */ + public static Object getSource(final String debuggerPath) throws Exception { + Query query = new Query() { + @Override + protected void execute(DataRequestMonitor rm) { + final ISourceLookupDMContext ctx = DMContexts.getAncestorOfType(fGdbControl.getContext(), + ISourceLookupDMContext.class); + fSourceLookup.getSource(ctx, debuggerPath, rm); + } + }; + + fSourceLookup.getExecutor().execute(query); + + return query.get(); + } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/SourceLookupTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/SourceLookupTest.java new file mode 100644 index 00000000000..f596b9d5768 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/SourceLookupTest.java @@ -0,0 +1,191 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.concurrent.ExecutionException; + +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.core.sourcelookup.MappingSourceContainer; +import org.eclipse.cdt.debug.internal.core.sourcelookup.MapEntrySourceContainer; +import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext; +import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData; +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.SyncUtil; +import org.eclipse.core.resources.IStorage; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Path; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector; +import org.eclipse.debug.core.sourcelookup.ISourceContainer; +import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; +import org.eclipse.debug.core.sourcelookup.containers.DefaultSourceContainer; +import org.eclipse.debug.core.sourcelookup.containers.DirectorySourceContainer; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * Tests that interaction with source lookups works as expected. + * + * All of these tests use a program (SourceLookup.exe) that was built from + * sources that have moved. At build time source was ../build/SourceLookup.cc, + * but now is ../src/SourceLookup.cc. + * + * TODO: Missing features and tests: + * + * - Update source lookup path in running session (i.e. simulate behaviour of + * CSourceNotFoundEditor) + * + * - Ensure breakpoints are inserted properly. This needs to be done by creating + * platform breakpoints and checking they are installed correctly. + */ +@RunWith(BackgroundRunner.class) +public class SourceLookupTest extends BaseTestCase { + protected static final String BUILD_PATH = "data/launch/build/"; + protected static final String EXEC_NAME = "SourceLookup.exe"; //$NON-NLS-1$ + + protected static final String SOURCE_ABSPATH = new File(SOURCE_PATH).getAbsolutePath(); + protected static final String BUILD_ABSPATH = new File(BUILD_PATH).getAbsolutePath(); + + @Override + public void doBeforeTest() throws Exception { + setLaunchAttributes(); + // source lookup attributes are custom per test, so delay launch until + // they are setup + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); + } + + /** + * Test with only default source locators on, that the source file was not + * found when stopped at main by any of GDB directly, with the source lookup + * director, or via the ISourceLookup service. + */ + @Test + public void defaultSourceLookup() throws Throwable { + doLaunch(); + + // Check file name as returned from back end + IFrameDMData frameData = SyncUtil.getFrameData(0, 0); + assertFalse("GDB Unexpectedly located the source", Files.exists(Paths.get(frameData.getFile()))); + + // Check file as resolved by source lookup director + ISourceLookupDirector director = (ISourceLookupDirector) getGDBLaunch().getSourceLocator(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(0, 0); + Object sourceElement = director.getSourceElement(frameDmc); + assertNull("Source Locator unexpectedly found the source", sourceElement); + + // Check file as resolved by ISourceLookup service + try { + SyncUtil.getSource(frameData.getFile()); + fail("Source Lookup service unexpectedly found the source"); + } catch (ExecutionException e) { + assertNotNull(e.getCause()); + assertTrue(e.getCause() instanceof CoreException); + assertEquals("No sources found", e.getCause().getMessage()); + } + } + + protected AbstractSourceLookupDirector setSourceContainer(ISourceContainer container) throws CoreException { + AbstractSourceLookupDirector director = (AbstractSourceLookupDirector) DebugPlugin.getDefault() + .getLaunchManager().newSourceLocator("org.eclipse.cdt.debug.core.sourceLocator"); + addSourceContainer(director, new DefaultSourceContainer()); + addSourceContainer(director, container); + return director; + } + + protected void addSourceContainer(AbstractSourceLookupDirector director, ISourceContainer container) + throws CoreException { + + ArrayList containerList = new ArrayList( + Arrays.asList(director.getSourceContainers())); + container.init(director); + containerList.add(container); + director.setSourceContainers(containerList.toArray(new ISourceContainer[containerList.size()])); + setLaunchAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, director.getMemento()); + setLaunchAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, director.getId()); + } + + /** + * Test with default source locators and a path mapping + * {@link MappingSourceContainer} from BUILD_ABSPATH -> SOURCE_ABSPATH that + * GDB does not locate the file, but the source lookup director and the + * source lookup service do find the file. + */ + @Test + public void sourceMapping() throws Throwable { + MappingSourceContainer mapContainer = new MappingSourceContainer("Mappings"); + mapContainer.addMapEntry(new MapEntrySourceContainer(new Path(BUILD_ABSPATH), new Path(SOURCE_ABSPATH))); + setSourceContainer(mapContainer); + doLaunch(); + + // Check file name as returned from back end + IFrameDMData frameData = SyncUtil.getFrameData(0, 0); + assertFalse("GDB Unexpectedly located the source", Files.exists(Paths.get(frameData.getFile()))); + + // Check file as resolved by source lookup director + ISourceLookupDirector director = (ISourceLookupDirector) getGDBLaunch().getSourceLocator(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(0, 0); + Object sourceElement = director.getSourceElement(frameDmc); + assertTrue("Source locator failed to find source", sourceElement instanceof IStorage); + + // Check file as resolved by ISourceLookup service + sourceElement = SyncUtil.getSource(frameData.getFile()); + assertTrue("Source Lookup service failed to find source", sourceElement instanceof IStorage); + } + + /** + * Test with default source locators and a {@link DirectorySourceContainer} + * for SOURCE_ABSPATH that GDB does not locate the file, but the source + * lookup director and the source lookup service do find the file. + * + * This test does not work with modern GDBs because the path passed into + * DirectorySourceContainer is an absolute path. See versioned test suites. + */ + @Test + public void directorySource() throws Throwable { + DirectorySourceContainer container = new DirectorySourceContainer(new Path(SOURCE_ABSPATH), false); + setSourceContainer(container); + doLaunch(); + + // Check file name as returned from back end + IFrameDMData frameData = SyncUtil.getFrameData(0, 0); + assertFalse("GDB Unexpectedly located the source", Files.exists(Paths.get(frameData.getFile()))); + + // Check file as resolved by source lookup director + ISourceLookupDirector director = (ISourceLookupDirector) getGDBLaunch().getSourceLocator(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(0, 0); + Object sourceElement = director.getSourceElement(frameDmc); + assertTrue("Source locator failed to find source", sourceElement instanceof IStorage); + + // Check file as resolved by ISourceLookup service + sourceElement = SyncUtil.getSource(frameData.getFile()); + assertTrue("Source Lookup service failed to find source", sourceElement instanceof IStorage); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/SourceLookupTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/SourceLookupTest_6_6.java new file mode 100644 index 00000000000..abc398b4a23 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/SourceLookupTest_6_6.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6.SourceLookupTest_7_6; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_6_6 extends SourceLookupTest { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); + } + + /** + * For details on the ignore, see {@link SourceLookupTest_7_6#sourceMapping()} + */ + @Ignore("Only works starting with GDB 7.6") + @Test + @Override + public void sourceMapping() throws Throwable { + super.sourceMapping(); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java index 982a458a2d3..06523051c1c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2014 Ericsson and others. + * Copyright (c) 2009, 2015 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 @@ -8,6 +8,7 @@ * Contributors: * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6; @@ -44,6 +45,7 @@ import org.junit.runners.Suite; PostMortemCoreTest_6_6.class, CommandTimeoutTest_6_6.class, StepIntoSelectionTest_6_6.class, + SourceLookupTest_6_6.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java index b62f36130a1..d0dc9d68bc7 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2014 Ericsson and others. + * Copyright (c) 2009, 2015 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 @@ -8,6 +8,7 @@ * Contributors: * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6; @@ -43,6 +44,7 @@ import org.junit.runners.Suite; OperationsWhileTargetIsRunningTest_6_6.class, CommandTimeoutTest_6_6.class, StepIntoSelectionTest_6_6.class, + SourceLookupTest_6_6.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/SourceLookupTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/SourceLookupTest_6_7.java new file mode 100644 index 00000000000..eb8d4b1c8a6 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/SourceLookupTest_6_7.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_6_6; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_6_7 extends SourceLookupTest_6_6 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java index 9e0f9de2188..1acb27ac872 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2014 Ericsson and others. + * Copyright (c) 2009, 2015 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 @@ -8,6 +8,7 @@ * Contributors: * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; @@ -44,6 +45,7 @@ import org.junit.runners.Suite; PostMortemCoreTest_6_7.class, CommandTimeoutTest_6_7.class, StepIntoSelectionTest_6_7.class, + SourceLookupTest_6_7.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java index 59e55cad8bd..920297abd32 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2014 Ericsson and others. + * Copyright (c) 2009, 2015 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 @@ -8,6 +8,7 @@ * Contributors: * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; @@ -43,6 +44,7 @@ import org.junit.runners.Suite; OperationsWhileTargetIsRunningTest_6_7.class, CommandTimeoutTest_6_7.class, StepIntoSelectionTest_6_7.class, + SourceLookupTest_6_7.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/SourceLookupTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/SourceLookupTest_6_8.java new file mode 100644 index 00000000000..cd7784b796b --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/SourceLookupTest_6_8.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; + +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_7.SourceLookupTest_6_7; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_6_8 extends SourceLookupTest_6_7 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java index 2ef681b33d5..ededa03bb18 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2014 Ericsson and others. + * Copyright (c) 2009, 2015 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 @@ -8,6 +8,7 @@ * Contributors: * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; @@ -44,6 +45,7 @@ import org.junit.runners.Suite; PostMortemCoreTest_6_8.class, CommandTimeoutTest_6_8.class, StepIntoSelectionTest_6_8.class, + SourceLookupTest_6_8.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java index 1217a3e422a..4441175fcda 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2014 Ericsson and others. + * Copyright (c) 2009, 2015 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 @@ -8,6 +8,7 @@ * Contributors: * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; @@ -43,6 +44,7 @@ import org.junit.runners.Suite; OperationsWhileTargetIsRunningTest_6_8.class, CommandTimeoutTest_6_8.class, StepIntoSelectionTest_6_8.class, + SourceLookupTest_6_8.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/SourceLookupTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/SourceLookupTest_7_0.java new file mode 100644 index 00000000000..c30d9657975 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/SourceLookupTest_7_0.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_6_8; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_0 extends SourceLookupTest_6_8 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java index 519ec962bbe..cffb0060592 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_0 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_0.class, StepIntoSelectionTest_7_0.class, StepIntoSelectionNonStopTest_7_0.class, + SourceLookupTest_7_0.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java index 5cc7ef64657..786c507f7d4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_0 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_0.class, StepIntoSelectionTest_7_0.class, StepIntoSelectionNonStopTest_7_0.class, + SourceLookupTest_7_0.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/SourceLookupTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/SourceLookupTest_7_1.java new file mode 100644 index 00000000000..d9400d44608 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/SourceLookupTest_7_1.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_7_0; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_1 extends SourceLookupTest_7_0 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java index af556122e53..0e5fa2b55ce 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_1 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_1.class, StepIntoSelectionTest_7_1.class, StepIntoSelectionNonStopTest_7_1.class, + SourceLookupTest_7_1.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java index c45d6edd612..806fb445170 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_1 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_1.class, StepIntoSelectionTest_7_1.class, StepIntoSelectionNonStopTest_7_1.class, + SourceLookupTest_7_1.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/SourceLookupTest_7_10.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/SourceLookupTest_7_10.java new file mode 100644 index 00000000000..cde7d27a69b --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/SourceLookupTest_7_10.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_10; + +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_9.SourceLookupTest_7_9; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_10 extends SourceLookupTest_7_9 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_10); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_7_10.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_7_10.java index a30cd51ea17..956c2eedd98 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_7_10.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_7_10.java @@ -8,6 +8,7 @@ * Contributors: * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_10 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_10; @@ -51,6 +52,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_10.class, StepIntoSelectionTest_7_10.class, StepIntoSelectionNonStopTest_7_10.class, + SourceLookupTest_7_10.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_Remote_7_10.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_Remote_7_10.java index 5a865ef5781..ce84901e070 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_Remote_7_10.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_10/Suite_Remote_7_10.java @@ -8,6 +8,7 @@ * Contributors: * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_10 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_10; @@ -52,6 +53,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_10.class, StepIntoSelectionTest_7_10.class, StepIntoSelectionNonStopTest_7_10.class, + SourceLookupTest_7_10.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/SourceLookupTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/SourceLookupTest_7_2.java new file mode 100644 index 00000000000..8028873d358 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/SourceLookupTest_7_2.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_7_1; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_2 extends SourceLookupTest_7_1 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java index 5bf8f811af7..f2ab950c53b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_2 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_2.class, StepIntoSelectionTest_7_2.class, StepIntoSelectionNonStopTest_7_2.class, + SourceLookupTest_7_2.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java index 75ea270f6c8..be9810b42af 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_2 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_2.class, StepIntoSelectionTest_7_2.class, StepIntoSelectionNonStopTest_7_2.class, + SourceLookupTest_7_2.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/SourceLookupTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/SourceLookupTest_7_3.java new file mode 100644 index 00000000000..d2c4e2e4d9e --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/SourceLookupTest_7_3.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_7_2; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_3 extends SourceLookupTest_7_2 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java index 12ce9b49c74..e8e1a03694a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_3 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_3.class, StepIntoSelectionTest_7_3.class, StepIntoSelectionNonStopTest_7_3.class, + SourceLookupTest_7_3.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java index c21826e4877..54a9c21bc62 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java @@ -9,6 +9,7 @@ * Ericsson - Initial Implementation * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_3 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; @@ -50,6 +51,7 @@ import org.junit.runners.Suite; GDBMultiNonStopRunControlTest_7_3.class, StepIntoSelectionTest_7_3.class, StepIntoSelectionNonStopTest_7_3.class, + SourceLookupTest_7_3.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/SourceLookupTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/SourceLookupTest_7_4.java new file mode 100644 index 00000000000..f32db8da339 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/SourceLookupTest_7_4.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_7_3; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_4 extends SourceLookupTest_7_3 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_7_4.java index 7bc11b0cdf7..87730466713 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_7_4.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_4 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; @@ -51,6 +52,7 @@ import org.junit.runners.Suite; GDBConsoleBreakpointsTest_7_4.class, StepIntoSelectionTest_7_4.class, StepIntoSelectionNonStopTest_7_4.class, + SourceLookupTest_7_4.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_Remote_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_Remote_7_4.java index f05032497be..9a1c1f6d334 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_Remote_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/Suite_Remote_7_4.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_4 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; @@ -52,6 +53,7 @@ import org.junit.runners.Suite; TraceFileTest_7_4.class, StepIntoSelectionTest_7_4.class, StepIntoSelectionNonStopTest_7_4.class, + SourceLookupTest_7_4.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/SourceLookupTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/SourceLookupTest_7_5.java new file mode 100644 index 00000000000..8a635505a9f --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/SourceLookupTest_7_5.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_7_4; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_5 extends SourceLookupTest_7_4 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_7_5.java index b8027256c93..ec031434af7 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_7_5.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_5 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; @@ -51,6 +52,7 @@ import org.junit.runners.Suite; GDBConsoleBreakpointsTest_7_5.class, StepIntoSelectionTest_7_5.class, StepIntoSelectionNonStopTest_7_5.class, + SourceLookupTest_7_5.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_Remote_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_Remote_7_5.java index 6c52b231b94..bbc45b81e7f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_Remote_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/Suite_Remote_7_5.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_5 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; @@ -52,6 +53,7 @@ import org.junit.runners.Suite; TraceFileTest_7_5.class, StepIntoSelectionTest_7_5.class, StepIntoSelectionNonStopTest_7_5.class, + SourceLookupTest_7_5.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/SourceLookupTest_7_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/SourceLookupTest_7_6.java new file mode 100644 index 00000000000..c218d2ef47b --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/SourceLookupTest_7_6.java @@ -0,0 +1,78 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +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.SourceLookupTest_7_5; +import org.eclipse.debug.core.sourcelookup.ISourceContainer; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_6 extends SourceLookupTest_7_5 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_6); + } + + /** + * Supported starting in GDB >= 7.6 because DSF is using the full path name + * to pass to the {@link ISourceContainer#findSourceElements(String)}. In + * versions prior to 7.6 the fullname field was not returned from GDB if the + * file was not found by GDB. See + * https://sourceware.org/ml/gdb-patches/2012-12/msg00557.html. + * + * Therefore in version < 7.5 the MI frame info has file="SourceLookup.cc" + * and no fullname field. This means there is no path to source map against. + * + * In version >= 7.6 the MI frame info has file="SourceLookup.cc",fullname= + * "/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/build/SourceLookup.cc" + * fields, so there is a path to do the mapping against. Recall that the + * test maps + * "/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/build" + * to "/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src" + */ + @Test + @Override + public void sourceMapping() throws Throwable { + super.sourceMapping(); + } + + /** + * Not supported in GDB >= 7.6 because DSF is using the full path name to + * pass to the {@link ISourceContainer#findSourceElements(String)}. In + * versions prior to 7.6 the fullname field was not returned from GDB if the + * file was not found by GDB. See + * https://sourceware.org/ml/gdb-patches/2012-12/msg00557.html + * + * Therefore in version < 7.5 the MI frame info has file="SourceLookup.cc" + * and no fullname field. This means that "SourceLookup.cc" gets passed to + * DirectorySourceContainer.findSourceElements(String), the container + * prepends the directory name and finds the source. + * + * In version >= 7.6 the MI frame info has file="SourceLookup.cc",fullname= + * "/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/build/SourceLookup.cc" + * As a result the fullname is passed to + * DirectorySourceContainer.findSourceElements(String), the container + * prepends the directory name and as a result does not find the source. + * What DirectorySourceContainer does is a file exists on: + * "/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src//dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/build/SourceLookup.cc" + * which obviously does not exist. + */ + @Ignore("Not supported in GDB >= 7.6 because DSF is using the full path name to pass to the ISourceContainer.findSourceElements") + @Test + @Override + public void directorySource() throws Throwable { + super.directorySource(); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_7_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_7_6.java index b65944ae9f5..d5fa375655b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_7_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_7_6.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_6 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6; @@ -52,6 +53,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_6.class, StepIntoSelectionTest_7_6.class, StepIntoSelectionNonStopTest_7_6.class, + SourceLookupTest_7_6.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_Remote_7_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_Remote_7_6.java index 9749fbd0400..997f24c473e 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_Remote_7_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_6/Suite_Remote_7_6.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_6 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6; @@ -53,6 +54,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_6.class, StepIntoSelectionTest_7_6.class, StepIntoSelectionNonStopTest_7_6.class, + SourceLookupTest_7_6.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/SourceLookupTest_7_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/SourceLookupTest_7_7.java new file mode 100644 index 00000000000..f549d3533df --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/SourceLookupTest_7_7.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_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_7_6.SourceLookupTest_7_6; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_7 extends SourceLookupTest_7_6 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_7); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_7_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_7_7.java index dc876d1c2b2..ce9ef629f27 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_7_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_7_7.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_7 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_7; @@ -52,6 +53,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_7.class, StepIntoSelectionTest_7_7.class, StepIntoSelectionNonStopTest_7_7.class, + SourceLookupTest_7_7.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_Remote_7_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_Remote_7_7.java index 3e8698ff83f..99cfd4c499f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_Remote_7_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_7/Suite_Remote_7_7.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_7 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_7; @@ -53,6 +54,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_7.class, StepIntoSelectionTest_7_7.class, StepIntoSelectionNonStopTest_7_7.class, + SourceLookupTest_7_7.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/SourceLookupTest_7_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/SourceLookupTest_7_8.java new file mode 100644 index 00000000000..507ef6e7f39 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/SourceLookupTest_7_8.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_8; + +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_7.SourceLookupTest_7_7; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_8 extends SourceLookupTest_7_7 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_8); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_7_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_7_8.java index 411ee552648..8ea605ba71f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_7_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_7_8.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_8 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_8; @@ -52,6 +53,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_8.class, StepIntoSelectionTest_7_8.class, StepIntoSelectionNonStopTest_7_8.class, + SourceLookupTest_7_8.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_Remote_7_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_Remote_7_8.java index 1624d29927d..7a28f13e016 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_Remote_7_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_8/Suite_Remote_7_8.java @@ -9,6 +9,7 @@ * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_8 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_8; @@ -53,6 +54,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_8.class, StepIntoSelectionTest_7_8.class, StepIntoSelectionNonStopTest_7_8.class, + SourceLookupTest_7_8.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/SourceLookupTest_7_9.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/SourceLookupTest_7_9.java new file mode 100644 index 00000000000..d8c07ffe655 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/SourceLookupTest_7_9.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2015 Kichwa Coders 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: + * Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765) + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_9; + +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_8.SourceLookupTest_7_8; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class SourceLookupTest_7_9 extends SourceLookupTest_7_8 { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_9); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_7_9.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_7_9.java index 9c54742975b..77364c4c79e 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_7_9.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_7_9.java @@ -8,6 +8,7 @@ * Contributors: * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_9 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_9; @@ -51,6 +52,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_9.class, StepIntoSelectionTest_7_9.class, StepIntoSelectionNonStopTest_7_9.class, + SourceLookupTest_7_9.class, /* Add your test class here */ }) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_Remote_7_9.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_Remote_7_9.java index 71f8b36e19b..10be4edc36e 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_Remote_7_9.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_9/Suite_Remote_7_9.java @@ -8,6 +8,7 @@ * Contributors: * Marc Khouzam (Ericsson) - Initial implementation of Test cases * Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_9 to suite + * Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765) *******************************************************************************/ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_9; @@ -52,6 +53,7 @@ import org.junit.runners.Suite; GDBConsoleSynchronizingTest_7_9.class, StepIntoSelectionTest_7_9.class, StepIntoSelectionNonStopTest_7_9.class, + SourceLookupTest_7_9.class, /* Add your test class here */ })