diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java index f10253685ff..fea280d0296 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuildCommandParser.java @@ -29,6 +29,13 @@ import org.eclipse.core.resources.IResource; /** * Abstract class for providers parsing compiler option from build command when present in build output. + *
+ * EXPERIMENTAL. This class interface is not stable yet as + * it is not currently (CDT 8.1, Juno) clear how it may need to be used in future. + * There is no guarantee that this API will work or that it will remain the same. + * Please do not use this API without consulting with the CDT team. + *
+ * @noextend This class is not intended to be subclassed by clients. * * @since 8.1 */ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java index 4cd57b67d42..4d1b14ea592 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java @@ -67,6 +67,13 @@ import org.w3c.dom.Element; /** * Abstract parser capable to execute compiler command printing built-in compiler * specs and parse built-in language settings out of it. + *+ * EXPERIMENTAL. This class interface is not stable yet as + * it is not currently (CDT 8.1, Juno) clear how it may need to be used in future. + * There is no guarantee that this API will work or that it will remain the same. + * Please do not use this API without consulting with the CDT team. + *
+ * @noextend This class is not intended to be subclassed by clients. * * @since 8.1 */ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java index bded3f9e06f..88f27ed61ad 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java @@ -60,6 +60,13 @@ import org.w3c.dom.Element; /** * Abstract class for language settings providers capable to parse build output. + *+ * EXPERIMENTAL. This class interface is not stable yet as + * it is not currently (CDT 8.1, Juno) clear how it may need to be used in future. + * There is no guarantee that this API will work or that it will remain the same. + * Please do not use this API without consulting with the CDT team. + *
+ * @noextend This class is not intended to be subclassed by clients. * * @since 8.1 */ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java index 8f0d1021cc4..3aaa528d10a 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuildCommandParser.java @@ -18,6 +18,13 @@ import org.eclipse.cdt.core.settings.model.ICSettingEntry; /** * Build command parser capable to parse gcc command in build output and generate * language settings per file being compiled. + *+ * EXPERIMENTAL. This class interface is not stable yet as + * it is not currently (CDT 8.1, Juno) clear how it may need to be used in future. + * There is no guarantee that this API will work or that it will remain the same. + * Please do not use this API without consulting with the CDT team. + *
+ * @noextend This class is not intended to be subclassed by clients. * * @since 8.1 */ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java index 865832c45ce..57231390965 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/GCCBuiltinSpecsDetector.java @@ -22,6 +22,13 @@ import org.eclipse.core.runtime.CoreException; /** * Language settings provider to detect built-in compiler settings for GCC compiler. + *+ * EXPERIMENTAL. This class interface is not stable yet as + * it is not currently (CDT 8.1, Juno) clear how it may need to be used in future. + * There is no guarantee that this API will work or that it will remain the same. + * Please do not use this API without consulting with the CDT team. + *
+ * @noextend This class is not intended to be subclassed by clients. * * @since 8.1 */ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java index e919180d5d8..0bf78b2ce0f 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/ToolchainBuiltinSpecsDetector.java @@ -24,6 +24,13 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin; * Abstract parser capable to execute compiler command printing built-in compiler * specs and parse built-in language settings out of it. The compiler to be used * is taken from MBS tool-chain definition. + *+ * EXPERIMENTAL. This class interface is not stable yet as + * it is not currently (CDT 8.1, Juno) clear how it may need to be used in future. + * There is no guarantee that this API will work or that it will remain the same. + * Please do not use this API without consulting with the CDT team. + *
+ * @noextend This class is not intended to be subclassed by clients. * * @since 8.1 */ diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/ChangeConfigurationTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/ChangeConfigurationTests.java new file mode 100644 index 00000000000..a8235dc64ee --- /dev/null +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/ChangeConfigurationTests.java @@ -0,0 +1,123 @@ +/******************************************************************************* + * Copyright (c) 2012 Marc-Andre Laperle 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-Andre Laperle - Initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.internal.pdom.tests; + +import java.util.regex.Pattern; + +import junit.framework.Test; + +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.dom.IPDOMManager; +import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.index.IIndex; +import org.eclipse.cdt.core.index.IndexFilter; +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.model.ICProject; +import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.core.settings.model.ICLanguageSetting; +import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry; +import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescriptionPreferences; +import org.eclipse.cdt.core.settings.model.ICSettingEntry; +import org.eclipse.cdt.core.settings.model.util.CDataUtil; +import org.eclipse.cdt.core.testplugin.CProjectHelper; +import org.eclipse.cdt.core.testplugin.CTestPlugin; +import org.eclipse.cdt.core.testplugin.util.TestSourceReader; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; + +public class ChangeConfigurationTests extends PDOMTestBase { + + public static Test suite() { + return suite(ChangeConfigurationTests.class); + } + + private void changeConfigRelations(IProject project, int option) throws CoreException { + ICProjectDescription pd= CCorePlugin.getDefault().getProjectDescription(project); + pd.setConfigurationRelations(option); + CCorePlugin.getDefault().setProjectDescription(project, pd); + CCorePlugin.getIndexManager().joinIndexer(8000, npm()); + } + + // Emulates ChangeConfigAction + private void changeProjectConfiguration(IProject project, String configName) throws CoreException, InterruptedException { + ICProjectDescription prjd = CCorePlugin.getDefault().getProjectDescriptionManager().getProjectDescription(project); + ICConfigurationDescription[] configs = prjd.getConfigurations(); + if (configs != null && configs.length > 0) { + for (ICConfigurationDescription config : configs) { + if (config.getName().equals(configName)) { + config.setActive(); + CoreModel.getDefault().setProjectDescription(project, prjd); + break; + } + } + } + } + + //#ifdef MACRO1 + //void testFunc1(); + //#endif + //#ifdef MACRO2 + //void testFunc2(); + //#endif + public void testRepeatedlyChangeConfig_bug375226() throws Exception { + ModelJoiner mj = new ModelJoiner(); + ICProject cProject = CProjectHelper.createNewStileCProject("testChangeConfiguration", IPDOMManager.ID_FAST_INDEXER); + IProject project = cProject.getProject(); + StringBuilder[] contents= TestSourceReader.getContentsForTest(CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), 1); + IFile file= TestSourceReader.createFile(cProject.getProject(), new Path("test.c"), contents[0].toString()); + mj.join(); + mj.dispose(); + changeConfigRelations(cProject.getProject(), ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE); + + ICProjectDescription prjd = CCorePlugin.getDefault().getProjectDescriptionManager().getProjectDescription(project); + ICConfigurationDescription configuration1 = prjd.getConfigurations()[0]; + String firstConfigName = configuration1.getName(); + for(ICLanguageSetting languageSetting : configuration1.getRootFolderDescription().getLanguageSettings()) + { + languageSetting.setSettingEntries(ICSettingEntry.MACRO, new ICLanguageSettingEntry[] { CDataUtil.createCMacroEntry("MACRO1", null, 0)}); + } + + ICConfigurationDescription configuration2 = prjd.createConfiguration("id2", "Configuration2", configuration1); + String secondConfigName = configuration2.getName(); + for(ICLanguageSetting languageSetting : configuration2.getRootFolderDescription().getLanguageSettings()) + { + languageSetting.setSettingEntries(ICSettingEntry.MACRO, new ICLanguageSettingEntry[] { CDataUtil.createCMacroEntry("MACRO2", null, 0)} ); + } + + CoreModel.getDefault().setProjectDescription(project, prjd); + CCorePlugin.getIndexManager().reindex(cProject); + waitForIndexer(cProject); + + Pattern testFunc1 = Pattern.compile("testFunc1"); + Pattern testFunc2 = Pattern.compile("testFunc2"); + int i = 0, noTrials = 50; + do { + IIndex index = CCorePlugin.getIndexManager().getIndex(cProject); + index.acquireReadLock(); + boolean isFirstConfig = i % 2 == 0; + IBinding[] bindings = index.findBindings(isFirstConfig ? testFunc1 : testFunc2, true, IndexFilter.ALL, new NullProgressMonitor()); + IBinding[] noBindings = index.findBindings(isFirstConfig ? testFunc2 : testFunc1, true, IndexFilter.ALL, new NullProgressMonitor()); + assertEquals(1, bindings.length); + assertEquals(0, noBindings.length); + index.releaseReadLock(); + + String nextConfig = isFirstConfig ? secondConfigName : firstConfigName; + changeProjectConfiguration(project, nextConfig); + waitForIndexer(cProject); + + i++; + } while (i < noTrials); + } +} diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java index ec57bfbf59a..fd92b1d2965 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java @@ -1,14 +1,15 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 QNX Software Systems and others. + * Copyright (c) 2006, 2012 QNX Software Systems 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: - * QNX - Initial API and implementation - * IBM Corporation - * Andrew Ferguson (Symbian) + * QNX - Initial API and implementation + * IBM Corporation + * Andrew Ferguson (Symbian) + * Marc-Andre Laperle *******************************************************************************/ package org.eclipse.cdt.internal.pdom.tests; @@ -55,6 +56,8 @@ public class PDOMTests extends TestSuite { suite.addTest(CCompositeTypeTests.suite()); suite.addTest(DefDeclTests.suite()); + suite.addTest(RaceCondition157992Test.suite()); + suite.addTest(ChangeConfigurationTests.suite()); return suite; } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/RaceCondition157992Test.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/RaceCondition157992Test.java index 37e1f7ea1e2..66dc26fa907 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/RaceCondition157992Test.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/RaceCondition157992Test.java @@ -1,19 +1,22 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 QNX Software Systems and others. + * Copyright (c) 2006, 2012 QNX Software Systems 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: - * QNX - Initial API and implementation - * Markus Schorn (Wind River Systems) - * Symbian - Repeatedly index classTests test project to detect a particular race condition + * QNX - Initial API and implementation + * Markus Schorn (Wind River Systems) + * Symbian - Repeatedly index classTests test project to detect a particular race condition + * Marc-Andre Laperle *******************************************************************************/ package org.eclipse.cdt.internal.pdom.tests; import java.util.regex.Pattern; +import junit.framework.Test; + import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.index.IndexFilter; import org.eclipse.cdt.core.model.ICProject; @@ -26,6 +29,11 @@ import org.eclipse.core.runtime.NullProgressMonitor; * Test case for a race condition from Bugzilla#157992 */ public class RaceCondition157992Test extends PDOMTestBase { + + public static Test suite() { + return suite(RaceCondition157992Test.class); + } + public void testRepeatedly() throws Exception { int successes = 0, noTrials = 100; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java index b662f38c14e..8f9636082fb 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2007, 2011 Intel Corporation and others. + * Copyright (c) 2007, 2012 Intel Corporation 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: - * Intel Corporation - Initial API and implementation - * IBM Corporation + * Intel Corporation - Initial API and implementation + * IBM Corporation + * Marc-Andre Laperle *******************************************************************************/ package org.eclipse.cdt.internal.core.settings.model; @@ -57,7 +58,7 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP DescriptionScannerInfoProvider(IProject project){ fProject = project; - CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADED); + CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.DATA_APPLIED | CProjectDescriptionEvent.LOADED); } private void updateProjCfgInfo(ICProjectDescription des){ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java index ac5ffdf6792..dff76ed18e6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java @@ -87,11 +87,7 @@ public class CPPASTFunctionCallExpression extends ASTNode CPPASTFunctionCallExpression copy = new CPPASTFunctionCallExpression(null, args); copy.setFunctionNameExpression(functionName == null ? null : functionName.copy(style)); - copy.setOffsetAndLength(this); - if (style == CopyStyle.withLocations) { - copy.setCopyLocation(this); - } - return copy; + return copy(copy, style); } @Override @@ -240,7 +236,7 @@ public class CPPASTFunctionCallExpression extends ASTNode overload= null; IType t= isExplicitTypeConversion(); if (t != null) { - t = getNestedType(t, TDEF|CVTYPE|REF); + t = getNestedType(t, TDEF | CVTYPE | REF); if (t instanceof ICPPClassType && !(t instanceof ICPPUnknownBinding)) { ICPPClassType cls= (ICPPClassType) t; LookupData data= CPPSemantics.createLookupData(((IASTIdExpression) functionName).getName()); @@ -252,9 +248,9 @@ public class CPPASTFunctionCallExpression extends ASTNode } } } else { - t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF|REF|CVTYPE); + t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF | REF | CVTYPE); if (t instanceof ICPPClassType) { - overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType)t); + overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType) t); } } } @@ -272,10 +268,10 @@ public class CPPASTFunctionCallExpression extends ASTNode return prvalueType(t); } - t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF|REF|CVTYPE); + t= SemanticUtil.getNestedType(functionName.getExpressionType(), TDEF | REF | CVTYPE); if (t instanceof ICPPClassType) { if (overload == UNINITIALIZED_FUNCTION) { - overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType)t); + overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType) t); } if (overload != null) { return typeFromFunctionCall(overload); @@ -294,7 +290,7 @@ public class CPPASTFunctionCallExpression extends ASTNode return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION); } - + private IType isExplicitTypeConversion() { if (functionName instanceof IASTIdExpression) { final IASTName name = ((IASTIdExpression) functionName).getName(); @@ -318,7 +314,7 @@ public class CPPASTFunctionCallExpression extends ASTNode IType t= functionName.getExpressionType(); if (t instanceof ICPPClassType) { if (overload == UNINITIALIZED_FUNCTION) { - overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType)t); + overload = CPPSemantics.findOverloadedOperator(this, (ICPPClassType) t); } if (overload != null) { return valueCategoryFromFunctionCall(overload); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java index f4f0219f14c..6a90fe119aa 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMManager.java @@ -12,6 +12,7 @@ * Sergey Prigogin (Google) * Tim Kelly (Nokia) * Anna Dushistova (MontaVista) + * Marc-Andre Laperle *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom; @@ -242,7 +243,7 @@ public class PDOMManager implements IWritableIndexManager, IListener { model.addElementChangedListener(fCModelListener); LanguageManager.getInstance().registerLanguageChangeListener(fLanguageChangeListener); LanguageSettingsManager.registerLanguageSettingsChangeListener(fLanguageSettingsChangeListener); - final int types= CProjectDescriptionEvent.DATA_APPLIED; + final int types= CProjectDescriptionEvent.APPLIED; CCorePlugin.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(fProjectDescriptionListener, types); try { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/language/settings/providers/AbstractLanguageSettingProviderOptionPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/language/settings/providers/AbstractLanguageSettingProviderOptionPage.java index 504b18a318a..a9352ab0b77 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/language/settings/providers/AbstractLanguageSettingProviderOptionPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/language/settings/providers/AbstractLanguageSettingProviderOptionPage.java @@ -22,6 +22,14 @@ import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsP /** * Abstract class to implement language settings providers Options page. + * + *+ * EXPERIMENTAL. This class interface is not stable yet as + * it is not currently clear how it may need to be used in future. Only bare + * minimum is provided here at this point (CDT 8.1, Juno). + * There is no guarantee that this API will work or that it will remain the same. + * Please do not use this API without consulting with the CDT team. + *
* @noextend This class is not intended to be subclassed by clients, only internally by CDT. * * @since 5.4 diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm index ce432905dd8..1584ad107e2 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm @@ -1,556 +1,382 @@ - - + + + - - - - - - -See What's new in CDT 8.1 on the CDT Wiki + which may contain more recent information. +
+ +See What's new in CDT 8.0 on the CDT Wiki -which may contain more recent information. +
The Call Hierarchy View can now be pinned which enables the user to open multiple Call Hierarchy views at the same time. +
+
This feature was completed November 12th, 2011 as part of Bug 342498 +
+
There are a few additional filtering options added to Project Explorer and Outline View: +
+
+
+
The main motivation for integrating Codan with external tools is to enjoy all the code checks from mature tools without leaving Eclipse. With the new infrastructure: +
+The new infrastructure includes a sample checker that invokes Cppcheck. +
+
A more detailed configuration dialog can be found by pressing the 'Customize Selected' button: +
+
Users can specify the path of the Cppcheck executable and the arguments to pass to Cppcheck. +
A demo of this checker can be found here. +
The new infrastructure makes it very easy to write your own external-tool-based checker. In the simplest case, you will need to: +
+Please take a look at the source code of CppcheckChecker for details. +
In the case of tools that are complex to set up, the new infrastructure is extremely flexible and configurable. It allows you to pretty much to configure every single aspect of the checker, from the files that the tool can check to the way to feed arguments to the tool. +
+struct Demo { + Demo() {} // Warning: Member 'field' was not initialized in this constructor + + int field; + }; ++
+
Scanner Discovery has been reworked in this release. The main purpose of Scanner Discovery was always to supply Include Paths and Macros for indexer and build. Now these are supplied by Language Settings Providers. See more at Scanner Discovery Wiki +
+
+
+
The new scanner discovery makes it possible to discover and use with indexer Mac OSX Frameworks folders, see bug 69529 +
+
+
Build console marks more prominently start and end of build and reports elapsed time: +
+
+
Parallel Build was remodelled, see bug 259768: +
+
+
A few additional options to select from added to managed build, bug 365461. +
+
+
CDT now optionally includes a Multicore Visualizer View. This view displays a graphical representation of the state of the current application. It allows one to click- and drag-select groups of processes/threads, and apply debugging commands to them directly from the visualizer. Selections made in the Visualizer View are reflected automatically in the Debug View, and vice versa. The Multicore Visualizer View is designed to scale to large numbers of cpus and cores-per-cpu on both current and future multicore hardware. +
The Multicore Visualizer View is meant to serve as a high-level visual overview of the current application, and can be used in tandem with the Debug View, which provides more in-depth detail. +
The Multicore Visualizer View is just one example of a visualizer based on the underlying Visualizer Framework plugin. This provides a pluggable, extensible platform for developing visual development tools of this kind. +
+
Note that the Multicore Visualizer will only work using a Linux target; it will not work debugging on a Windows or Mac target. This is a current limitation of GDB which does not provide information about cores, for those targets (at writing, GDB is at version 7.4). +
This feature was completed on February 10th, 2012. For details see Bug 335027 +
The Multicore Visualizer is an optional feature of the CDT and must be installed manually. The feature is called "C/C++ Multicore Visualizer". Installing it will install both the Multicore Visualizer and the Visualizer Framework. If you only want to install the Visualizer Framework (to build your own visualizer), you can install that feature by itself; it is called "CDT Visualizer Framework". Once the features are installed, you can access the Multicore Visualizer (or any other visualizer) by opening the view called "Visualizer". +
+CDT now displays large arrays as collections of partitions. +
+
This feature was completed on January 26th, 2012 as part of Bug 365541 +
+It is no longer necessary to first create a CDT breakpoint, then edit its properties. Properties such as enabled, ignore count, condition, temporary, can be set while creating the breakpoint. +
There are several methods to open the properties dialog before creating the breakpoint: +
+
+
Image: The breakpoint properties dialog for a line breakpoint about to be created. +
+The Toggle Breakpoint action in the editor and disassembly view menu now supports new behaviors when used with modifier keys: +
+
+
Image:The editor gutter popup menu with the hints for the new accelerators. +
+There is a new option for creating a function breakpoint: +
+CDT now supports the handling of different character encodings for strings and wide character strings while debugging. This includes full support for Unicode encodings and many other popular encodings as well. You can select the character and wide character encoding within the Debug preferences. +
+
CDT will then correctly display strings according to the selected encoding while debugging. +
+
Note that this feature requires GDB version 7.0 or later. This feature was completed on March 7th, 2012 as part of Bug 307311, Bug 367456 and Bug 370462. +
+Timeouts for GDB commands are now supported in DSF/GDB. The feature is optional and disabled by default. The timeout values are configurable. When the feature is enabled, custom values can be assigned to some commands, all other commands use the default value. This feature was completed on April 17th, 2012 as part of Bug 361934. +
+
+
+
CDT now allows to perform a Resume or Suspend operation on multiple selections of the same debug session. Because such a concept only adds value in a Non-Stop debug session, it is only supported in such a session (see Non-Stop Debugging). The behavior of a multi-selection Resume/Suspend is as follows: +
+As hinted above, CDT takes a permissive approach to multi-select resume/suspend. This means that if a multi-selection includes both stopped and running threads, a resume operation is still allowed, and only the suspended threads will be resumed; similarly, on such a multi-selection, a suspend operation is allowed, and only the running threads will be suspended. +
Example +
+
In the above screenshot if the user were to press the Resume button with the current multi-selection the following would happen: +
+This feature was completed April 25th, 2012 as part of Bug 330974 +
+CDT now has an global preference that allows to only show the suspended threads within the Debug view. When dealing with a large number of threads, a user is typically interested by the threads that are being inspected (suspended ones) and does not care about the running ones. Using this preference, all running threads will not be shown in the Debug view. Note that when a thread is stepping it will remain visible, although it is technically running. The process element of the Debug view will show how many threads are currently being filtered from view. +
The below example shows the exact same debugging session. The first screenshot only shows suspended threads, while the second shows all threads. +
+
+
Below shows how to access the preference, which is disabled by default. +
+
This feature was completed May 4th, 2012 as part of Bug 375585 +
+CDT now allows selecting more than one process to attach to in a single user operation. The bottom pane is used to see which processes have been selected. If multi-process debugging is not supported with your debug session (needs GDB >= 7.2 and NonStop enabled), only the first process will be attached to. +
+
This feature was completed June 30th, 2011 as part of Bug 293679 +
+CDT now allows the user to specify a default directory for the location of core files for a postmortem launch when the prompt is triggered. Since a postmortem launch can easily be re-used for different core files of the same binary, this feature helps reduce the amount of navigation needed to select a core file. Note that specifying the actual core file is still supported, as well as leaving the entire field blank, which will also trigger the prompt, but use the default directory for its starting location. +
Note that this 'core file' field supports the use of variables such as ${workspace_loc}. +
This feature applies to both core files and trace files. +
+
This feature was completed on February 17th, 2012 as part of Bug 362039 +
+CDT now allows the user of fast tracepoints, as supported by GDB. Fast tracepoints use an instruction jump instead of a trap for efficiency. Fast tracepoint need a minimum of space to be inserted in the program and therefore, may fail to be set at certain locations. For fast tracepoints to work, a special library called the in-process agent (IPA), must be loaded in the inferior process. This library is built and distributed as an integral part of gdbserver. Please see the GDB documentation for more details. +
The user can select between three tracepoint modes in the launch: +
+
+
This feature was completed July 20th, 2011 as part of Bug 346320 +
+With the use of GDB 7.4, some new features are available within Eclipse. +
+
+
+
With GDB 7.5 or higher CDT could show the actual variable type (not the declared one) in Variables and Expressions Views. Consider the following example: +
+struct SuperInterface { + virtual ~SuperInterface() {} // enable RTTI for Interface class + }; + + struct TheImplementation : public SuperInterface { + TheImplementation(int _v1, float _v2) + : someField(_v1), anotherField(_v2) {} + + int someField; + float anotherField; + }; + + + int main() { + SuperInterface* i = new TheImplementation(42, 4.2); + return 0; // [Launch debug until here] + } ++
Launch the debugging session and run until return statement: +
+
This feature is enabled by default and will work if you have the proper GDB version (7.5 or higher) and RTTI generation enabled (enabled by default in gcc), however it could be turned off in preferences: +
+
This feature was completed on May 5th, 2012 as part of Bug 376901 and Bug 377536. +
+
+
There are also a few new CDT-specific build variables: +
+This feature was completed on April 2nd, 2012 as part of Bug 180256 and Bug 375814. +
+CDI now also supports to use the octal number format to display the contents of variables, expressions and registers. You can select the octal number format within the Debug preferences. This feature was completed on March 7th, 2012 as part of Bug 370462. +
+
+
+
Supported features: +
+The HOWTO, known problems and limitation can be found in the corresponding section of CDT FAQ. +
This feature was completed April 18th, 2012 as part of Bug 210366. +
+Bugzilla tasks completed for this release: + +CDT 8.1 bug fixes +
- Editor
- |
- |
- Override_Markers - |
-
- In C++ files, method declarations and definitions are annotated on the vertical bar using three types of symbols: -
As in JDT, the annotations have the action which allows to go to the declaration in base. - In case of multiple inheritance, the messages also contain the name of direct base class of the overriding method's class if the overrided method's class is further up the inheritance hierarchy. - -Contrary to JDT, several messages are sometimes generated on one marker (e.g. when the same method is overridden through several base classes). - - |
-
- Selection Expansion - |
-
- The C++ editor now allows to expand the selection to enclosing, next and previous nodes of the AST, as well as restore the hierarchy. - -The behaviour is strictly analogous to JDT and the actions are located in "Edit -> Expand Selection To" menu. - - |
-
- Camel Case Completion - |
-
- The C/C++ now supports camel case completion similar to the one of the JDT. The following additional features are available: - -
|
-
- Configurable Name Style - |
-
- User-configurable name styles for constants, variables, class fields, getters and setters, and for header, source and test files. - - |
-
- New Code Formatting Options - |
-
- New options for formatting of constructor initializer lists, stream output expressions, and inline comments. Numerous improvements to the code formatter. - - |
-
- New Code Templates - |
-
- New code templates for namespace and class declarations and for C++ test files. - - |
-
- Code Analysis (Codan)
- |
- |
- Unresolved Symbols - |
-
- Codan now has a checker which generates Problems on instances of ProblemBindings in AST, generated by the Parser. This allows to reveal many errors while typing. - Quick fixes are provided for a subset of problems. As for now, the available fixes are: - -
|
-
- Refactoring
- |
- |
- Rename Refactoring as Quick Fix - |
-
- Rename in workspace option in quick fix. - |
-
- Lightweight Rename Refactoring - |
-
- JDT-style rename refactoring. - |
-
- Toggle Function Definition - |
-
- Toggle Function Definition moves a function definition inside an C/C++ source editor from one - position to another and preserves correctness. - - |
-
- Build
- |
- |
- Build Console - |
-
-
|
-
- Error Parsers - |
-
-
|
-
- Make Targets - |
-
-
|
-
- Managed Build - |
-
-
|
-
- Scanner Discovery - |
-
-
|
-
- Debug
- |
- |
- Project-less debugging - |
-
- CDT can now be used to debug any binary, without needing to specify or even create a project in Eclipse. This is supported for all types of debugging (local, remote, attach, and post-mortem sessions). - Furthermore, for an attach session (local or remote), there is even no need to specify the binary; for a local attach, GDB can find the binary automatically, while for a remote attach, CDT will prompt for it when it needs it. - -This feature was completed April 26th, 2011 as part of Bug 343861 - |
-
- Support for full pretty-printing of complex structures - |
-
- With the proper setup of GDB, DSF-GDB will now print complex structures such as Maps, Lists and Vectors, in a user-friendly fashion, within the Variables and Expressions views, as well as the advanced Debug hover of the Editor. See below on how to setup GDB for this feature to work. -
|
-
- Support for pending breakpoints - |
-
- When a breakpoint is set in a dynamically-linked library that was not loaded yet, the breakpoint will now work, once the library is loaded. See bug 248595. This feature is currently only supported when using GDB 6.8 or later. - - |
-
- Showing cores in Debug view labels - |
-
- By using the enhancements of GDB 7.1, DSF-GDB now shows the core on which each thread runs as an extra part of the Debug View label. The list of all cores on which a process is located is also added as a label. The below image shows the new feature. - -This feature has been implemented for CDT 8.0 as of July 6th, 2010, as part of Bug 318230. The feature will be enabled automatically as long as GDB 7.1 or greater is used. - - |
-
- Showing cores and owner in attach prompter - |
-
- DSF-GDB now shows the owner of a process as an extra part of the process prompt for an attach session. The owner id will be shown starting with GDB 7.0. For a Remote attach session (using gdbserver --multi), the cores on which a process is located will also be shown. Showing the cores starts with GDB 7.1. The below image shows the new feature. - This feature has been implemented for CDT 8.0 as of July 30th, 2010, as part of Bug 318230 comment 21. The feature will be enabled automatically as long as the proper version of GDB is used. - - |
-
- Pin & Clone - |
-
- Variables, Expressions, Registers, Disassembly, and Memory Browser now supports opening multiple instances, and pin the view input to the selected debug context(s) in the Debug view. This can be used, for example, to easily compare the data of different threads. - -This feature has been implemented for CDT 8.0 as of Feb 15th, 2011, as part of Bug 327263, Bug 331781, and Bug 334566. - - |
-
- Multi-process Debugging - |
-
- CDT now supports debugging multiple processes in a single debug session. It allows to attach/detach and start/stop processes repeatedly and easily. - Requirements: - -
To use multi-process debugging, simply launch an application as you normally would, locally or remotely, using gdbserver, and make sure to select Non-stop mode in the Debugger tab. Then, use the Debug View's "Connect" button to trigger a dialog with allows you to either attach to a running process, or to create a new process using the "New..." button. Currently, the "New..." button is only supported for Local debug sessions. - -
You will then have the newly selected process added to your debug session, where you can control it and examine it. You can use the "Disconnect" button to remove processes from your debug session, or you can use the "Connect" button to add new ones. - -
An option to automatically attach to a forked process is also available. This means that whenever any process you are currently debugging forks a new process, that new process will be added to your debug session. - - |
-
- C/C++ Remote Application launch - |
-
- The optional "C/C++ Remote Application" launch configuration type has been made permanent for CDT. - -The "GDB (DSF) Remote System Process" launch delegate has been renamed to "GDB (DSF) Manual Remote Debugging" and has been moved from "C/C++ Application" to "C/C++ Remote Application". As was the case for CDT 7.0, the optional RSE Remote Launch delegate of org.eclipse.cdt.launch.remote, is still part of "C/C++ Remote Application". - This optional remote launch now provides a new DSF-GDB-based launch delegate called "GDB (DSF) Automatic Remote Debugging". This launch is very similar to the existing "GDB (DSF) Manual Remote Debugging" delegate, except that the automatic one will automatically download the application to the remote target and start gdbserver with the application. - -By default, the user will be shown the "GDB (DSF) Manual Remote Debugging". However, if the optional feature of Remote Launch is installed, the default will automatically become the more feature-rich "GDB (DSF) Automatic Remote Debugging". - Finally, the run-mode RSE Remote Launch delegate no longer shows the Debugger or Source tabs, since they were not relevant, in run-mode. - - |
-
- New set of preferences - |
-
- A set of new preferences have been added to Preferences->C/C++->Debug->GDB to allow users to have a better debugging experience. These new preference are: - -
|
-
- Extra node for debugged process no longer shown - |
-
- The debugged process extra launch node has been removed from the Debug view. This node was felt to waste space, especially when dealing with multi-process debugging as we would have needed many of them. The Debug view already shows the debugged process as a container of threads, right below the launch node. - - |
-
- API Changes and Migration to CDT 8.0
- |
- |
- - |
-
- The changes affecting compatibility are listed here. Keep in mind that this list likely does not list all the issues, only some of them. - - |
-
- General - |
-
-
|
-
- DSF-GDB - |
-
-
(IBreakpointsTargetDMContext)fCommandControl.getContext() // Will fail with an Invalid Cast exception -(IDisassemblyDMContext)fCommandControl.getContext() // Will fail with an Invalid Cast exception -- will now fail because the command control context is no longer an IBreakpointsTargetDMContext/IDisassemblyDMContext. Instead, MIContainerDMC now implements IBreakpointsTargetDMContext/IDisassemblyDMContext. This change was necessary to fully support multi-process and was done in bug 335324 and bug 344298. - - |
-
- Codan - |
-
- The class org.eclipse.cdt.codan.core.cxx.model.CxxModelsCache is no longer a singleton. - |
-
- Bugs Fixed
- |
- |
- Fixed - |
- Bugzilla tasks completed for this release: - - CDT 8.0 bug fixes - | -
- Known Limitations
- |
- |
- Limitations - |
- Cannot run or debug class in a project with GB18030 characters in workspace/project name. - Most class libraries do not properly support the creation of a system process (via java.lang.Runtime.exec(...)) - when the specified command line contains GB18030 characters. This limitation means the scanner - discovery mechanism and debugger cannot launch applications when the command line it generates - contains GB18030 characters. Details in Bug 308803 - | -
To learn what's new in CDT releases see:
- - - - - -Back to Top - -
+
To learn what's new in other CDT releases see:
+ + + + + + + + +- diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm index 27f4c93ce54..7b3971d6ce9 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm @@ -11,7 +11,7 @@ td {border-top: solid thin black;} img[alt] {} tr {vertical-align: top;} -
To learn what's new in CDT releases see:
+ diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm index 7e1ba1034c9..f00abe79b3a 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm @@ -11,7 +11,7 @@ td {border-top: solid thin black;} img[alt] {} tr {vertical-align: top;} -To learn what's new in CDT releases see:
+ diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_80.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_80.htm new file mode 100644 index 00000000000..0ff1521945f --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_80.htm @@ -0,0 +1,556 @@ + + + + + + + + + +See What's new in CDT 8.0 on the CDT Wiki +which may contain more recent information. +
+
+ Editor
+ |
+ |
+ Override_Markers + |
+
+ In C++ files, method declarations and definitions are annotated on the vertical bar using three types of symbols: +
As in JDT, the annotations have the action which allows to go to the declaration in base. + In case of multiple inheritance, the messages also contain the name of direct base class of the overriding method's class if the overrided method's class is further up the inheritance hierarchy. + +Contrary to JDT, several messages are sometimes generated on one marker (e.g. when the same method is overridden through several base classes). + + |
+
+ Selection Expansion + |
+
+ The C++ editor now allows to expand the selection to enclosing, next and previous nodes of the AST, as well as restore the hierarchy. + +The behaviour is strictly analogous to JDT and the actions are located in "Edit -> Expand Selection To" menu. + + |
+
+ Camel Case Completion + |
+
+ The C/C++ now supports camel case completion similar to the one of the JDT. The following additional features are available: + +
|
+
+ Configurable Name Style + |
+
+ User-configurable name styles for constants, variables, class fields, getters and setters, and for header, source and test files. + + |
+
+ New Code Formatting Options + |
+
+ New options for formatting of constructor initializer lists, stream output expressions, and inline comments. Numerous improvements to the code formatter. + + |
+
+ New Code Templates + |
+
+ New code templates for namespace and class declarations and for C++ test files. + + |
+
+ Code Analysis (Codan)
+ |
+ |
+ Unresolved Symbols + |
+
+ Codan now has a checker which generates Problems on instances of ProblemBindings in AST, generated by the Parser. This allows to reveal many errors while typing. + Quick fixes are provided for a subset of problems. As for now, the available fixes are: + +
|
+
+ Refactoring
+ |
+ |
+ Rename Refactoring as Quick Fix + |
+
+ Rename in workspace option in quick fix. + |
+
+ Lightweight Rename Refactoring + |
+
+ JDT-style rename refactoring. + |
+
+ Toggle Function Definition + |
+
+ Toggle Function Definition moves a function definition inside an C/C++ source editor from one + position to another and preserves correctness. + + |
+
+ Build
+ |
+ |
+ Build Console + |
+
+
|
+
+ Error Parsers + |
+
+
|
+
+ Make Targets + |
+
+
|
+
+ Managed Build + |
+
+
|
+
+ Scanner Discovery + |
+
+
|
+
+ Debug
+ |
+ |
+ Project-less debugging + |
+
+ CDT can now be used to debug any binary, without needing to specify or even create a project in Eclipse. This is supported for all types of debugging (local, remote, attach, and post-mortem sessions). + Furthermore, for an attach session (local or remote), there is even no need to specify the binary; for a local attach, GDB can find the binary automatically, while for a remote attach, CDT will prompt for it when it needs it. + +This feature was completed April 26th, 2011 as part of Bug 343861 + |
+
+ Support for full pretty-printing of complex structures + |
+
+ With the proper setup of GDB, DSF-GDB will now print complex structures such as Maps, Lists and Vectors, in a user-friendly fashion, within the Variables and Expressions views, as well as the advanced Debug hover of the Editor. See below on how to setup GDB for this feature to work. +
|
+
+ Support for pending breakpoints + |
+
+ When a breakpoint is set in a dynamically-linked library that was not loaded yet, the breakpoint will now work, once the library is loaded. See bug 248595. This feature is currently only supported when using GDB 6.8 or later. + + |
+
+ Showing cores in Debug view labels + |
+
+ By using the enhancements of GDB 7.1, DSF-GDB now shows the core on which each thread runs as an extra part of the Debug View label. The list of all cores on which a process is located is also added as a label. The below image shows the new feature. + +This feature has been implemented for CDT 8.0 as of July 6th, 2010, as part of Bug 318230. The feature will be enabled automatically as long as GDB 7.1 or greater is used. + + |
+
+ Showing cores and owner in attach prompter + |
+
+ DSF-GDB now shows the owner of a process as an extra part of the process prompt for an attach session. The owner id will be shown starting with GDB 7.0. For a Remote attach session (using gdbserver --multi), the cores on which a process is located will also be shown. Showing the cores starts with GDB 7.1. The below image shows the new feature. + This feature has been implemented for CDT 8.0 as of July 30th, 2010, as part of Bug 318230 comment 21. The feature will be enabled automatically as long as the proper version of GDB is used. + + |
+
+ Pin & Clone + |
+
+ Variables, Expressions, Registers, Disassembly, and Memory Browser now supports opening multiple instances, and pin the view input to the selected debug context(s) in the Debug view. This can be used, for example, to easily compare the data of different threads. + +This feature has been implemented for CDT 8.0 as of Feb 15th, 2011, as part of Bug 327263, Bug 331781, and Bug 334566. + + |
+
+ Multi-process Debugging + |
+
+ CDT now supports debugging multiple processes in a single debug session. It allows to attach/detach and start/stop processes repeatedly and easily. + Requirements: + +
To use multi-process debugging, simply launch an application as you normally would, locally or remotely, using gdbserver, and make sure to select Non-stop mode in the Debugger tab. Then, use the Debug View's "Connect" button to trigger a dialog with allows you to either attach to a running process, or to create a new process using the "New..." button. Currently, the "New..." button is only supported for Local debug sessions. + +
You will then have the newly selected process added to your debug session, where you can control it and examine it. You can use the "Disconnect" button to remove processes from your debug session, or you can use the "Connect" button to add new ones. + +
An option to automatically attach to a forked process is also available. This means that whenever any process you are currently debugging forks a new process, that new process will be added to your debug session. + + |
+
+ C/C++ Remote Application launch + |
+
+ The optional "C/C++ Remote Application" launch configuration type has been made permanent for CDT. + +The "GDB (DSF) Remote System Process" launch delegate has been renamed to "GDB (DSF) Manual Remote Debugging" and has been moved from "C/C++ Application" to "C/C++ Remote Application". As was the case for CDT 7.0, the optional RSE Remote Launch delegate of org.eclipse.cdt.launch.remote, is still part of "C/C++ Remote Application". + This optional remote launch now provides a new DSF-GDB-based launch delegate called "GDB (DSF) Automatic Remote Debugging". This launch is very similar to the existing "GDB (DSF) Manual Remote Debugging" delegate, except that the automatic one will automatically download the application to the remote target and start gdbserver with the application. + +By default, the user will be shown the "GDB (DSF) Manual Remote Debugging". However, if the optional feature of Remote Launch is installed, the default will automatically become the more feature-rich "GDB (DSF) Automatic Remote Debugging". + Finally, the run-mode RSE Remote Launch delegate no longer shows the Debugger or Source tabs, since they were not relevant, in run-mode. + + |
+
+ New set of preferences + |
+
+ A set of new preferences have been added to Preferences->C/C++->Debug->GDB to allow users to have a better debugging experience. These new preference are: + +
|
+
+ Extra node for debugged process no longer shown + |
+
+ The debugged process extra launch node has been removed from the Debug view. This node was felt to waste space, especially when dealing with multi-process debugging as we would have needed many of them. The Debug view already shows the debugged process as a container of threads, right below the launch node. + + |
+
+ API Changes and Migration to CDT 8.0
+ |
+ |
+ + |
+
+ The changes affecting compatibility are listed here. Keep in mind that this list likely does not list all the issues, only some of them. + + |
+
+ General + |
+
+
|
+
+ DSF-GDB + |
+
+
(IBreakpointsTargetDMContext)fCommandControl.getContext() // Will fail with an Invalid Cast exception +(IDisassemblyDMContext)fCommandControl.getContext() // Will fail with an Invalid Cast exception ++ will now fail because the command control context is no longer an IBreakpointsTargetDMContext/IDisassemblyDMContext. Instead, MIContainerDMC now implements IBreakpointsTargetDMContext/IDisassemblyDMContext. This change was necessary to fully support multi-process and was done in bug 335324 and bug 344298. + + |
+
+ Codan + |
+
+ The class org.eclipse.cdt.codan.core.cxx.model.CxxModelsCache is no longer a singleton. + |
+
+ Bugs Fixed
+ |
+ |
+ Fixed + |
+ Bugzilla tasks completed for this release: + + CDT 8.0 bug fixes + | +
+ Known Limitations
+ |
+ |
+ Limitations + |
+ Cannot run or debug class in a project with GB18030 characters in workspace/project name. + Most class libraries do not properly support the creation of a system process (via java.lang.Runtime.exec(...)) + when the specified command line contains GB18030 characters. This limitation means the scanner + discovery mechanism and debugger cannot launch applications when the command line it generates + contains GB18030 characters. Details in Bug 308803 + | +
To learn what's new in CDT releases see:
+ + + + + +Back to Top + +
+ + + + diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/anonymous.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/anonymous.png new file mode 100644 index 00000000000..8125539bd5f Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/anonymous.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_hidingpref.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_hidingpref.png new file mode 100644 index 00000000000..5cc426ce7aa Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_hidingpref.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_nohiding.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_nohiding.png new file mode 100644 index 00000000000..4baca6c1ed9 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_nohiding.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_variabletypebasedonrtti.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_variabletypebasedonrtti.png new file mode 100644 index 00000000000..b99477af698 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_variabletypebasedonrtti.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_variabletypebasedonrttipref.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_variabletypebasedonrttipref.png new file mode 100644 index 00000000000..2470344d278 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_variabletypebasedonrttipref.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_varsinappplicationfield.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_varsinappplicationfield.png new file mode 100644 index 00000000000..b979e729efa Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_varsinappplicationfield.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_withhiding.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_withhiding.png new file mode 100644 index 00000000000..4603b16eee0 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_debug_withhiding.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_n_and_n_8_1_add_breakpoint_dialog.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_n_and_n_8_1_add_breakpoint_dialog.png new file mode 100644 index 00000000000..9985f07d224 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_n_and_n_8_1_add_breakpoint_dialog.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_n_and_n_8_1_editor_gutter_menu.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_n_and_n_8_1_editor_gutter_menu.png new file mode 100644 index 00000000000..50e700881b1 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cdt_n_and_n_8_1_editor_gutter_menu.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/charsetdebug.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/charsetdebug.png new file mode 100644 index 00000000000..0337756813b Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/charsetdebug.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/collectstring.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/collectstring.png new file mode 100644 index 00000000000..4f72d05f558 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/collectstring.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/console81.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/console81.png new file mode 100644 index 00000000000..9da0f1fd54f Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/console81.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/corepath.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/corepath.png new file mode 100644 index 00000000000..a2374fc0c3d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/corepath.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cppcheck_config_1.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cppcheck_config_1.png new file mode 100644 index 00000000000..7a962df2a42 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cppcheck_config_1.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cppcheck_config_2.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cppcheck_config_2.png new file mode 100644 index 00000000000..605cc439076 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cppcheck_config_2.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cunittest_launch.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cunittest_launch.png new file mode 100644 index 00000000000..eedb9e0b353 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cunittest_launch.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/cunittest_view.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/cunittest_view.png new file mode 100644 index 00000000000..8f4e42bcb23 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/cunittest_view.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/debugpreferences.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/debugpreferences.png new file mode 100644 index 00000000000..1c4abb9af90 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/debugpreferences.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/extrawarnings.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/extrawarnings.png new file mode 100644 index 00000000000..b35b4234e8c Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/extrawarnings.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/fasttracepointselection.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/fasttracepointselection.png new file mode 100644 index 00000000000..f7aee289267 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/fasttracepointselection.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/frameworks.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/frameworks.png new file mode 100644 index 00000000000..2558c6ec2a1 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/frameworks.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/largearray.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/largearray.png new file mode 100644 index 00000000000..ea0fceed72d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/largearray.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/multiselect.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/multiselect.png new file mode 100644 index 00000000000..ad09989ec5f Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/multiselect.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/multiselectruncontrol.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/multiselectruncontrol.png new file mode 100644 index 00000000000..6f0e8ad9022 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/multiselectruncontrol.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/parallelbuild.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/parallelbuild.png new file mode 100644 index 00000000000..26da1c49a7c Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/parallelbuild.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/pin_view_call_hierarchy.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/pin_view_call_hierarchy.png new file mode 100644 index 00000000000..a00196f8a34 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/pin_view_call_hierarchy.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/sd90entries.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/sd90entries.png new file mode 100644 index 00000000000..66977cca07d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/sd90entries.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/sd90providers.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/sd90providers.png new file mode 100644 index 00000000000..4d602b901de Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/sd90providers.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/timeoutadvanced.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/timeoutadvanced.png new file mode 100644 index 00000000000..0f7d4747449 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/timeoutadvanced.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/timeoutpreferences.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/timeoutpreferences.png new file mode 100644 index 00000000000..0643c844f3f Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/timeoutpreferences.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt81/visualizersnapshot.png b/doc/org.eclipse.cdt.doc.user/images/cdt81/visualizersnapshot.png new file mode 100644 index 00000000000..25c671c7894 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt81/visualizersnapshot.png differ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence.java index be4fe2d0da3..ba0797d0f3b 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence.java @@ -9,6 +9,7 @@ * Ericsson - initial API and implementation * Marc Khouzam (Ericsson) - Support setting the path in which the core file * dialog should start (Bug 362039) + * Sergey Prigogin (Google) - Bug 381804 *******************************************************************************/ package org.eclipse.cdt.dsf.gdb.service; @@ -40,6 +41,7 @@ import org.eclipse.cdt.dsf.mi.service.MIProcesses; import org.eclipse.cdt.dsf.mi.service.command.CommandFactory; import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; import org.eclipse.cdt.dsf.service.DsfServicesTracker; +import org.eclipse.cdt.utils.CommandLineUtil; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; @@ -201,7 +203,7 @@ public class DebugNewProcessSequence extends ReflectionSequence { String args = fBackend.getProgramArguments(); if (args != null) { - String[] argArray = args.replaceAll("\n", " ").split(" "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + String[] argArray = CommandLineUtil.argumentsToArray(args); fCommandControl.queueCommand( fCommandFactory.createMIGDBSetArgs(getContainerContext(), argArray), new ImmediateDataRequestMonitor