1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00
Commit graph

25553 commits

Author SHA1 Message Date
Jonah Graham
2bc9836f68 Bump cdt-baseline sequence number
When the baseline was changed to CDT 9.3, the sequence number was not
changed. That means that Eclipse PDE does not "see" the change to the
content and therefore while it appears that the baseline is 9.3, it will
continue to actually be 9.2, leading to lots of API errors.

Change-Id: Ie4103f24fe28afcadd8722b0da463febe372bdd8
2017-11-08 14:11:39 +00:00
Doug Schaefer
ffdb004e67 Adjust Arduino to new GCCToolChain API and add type and id/name.
Change-Id: Ia089985425c7f1a6fe347c41a6a01e5ab16d8208
2017-11-07 13:57:03 -05:00
Doug Schaefer
b495a5faae Hook up the clang toolchain now split out from GCC.
Change-Id: I6edba9e689d903546be3a65060c4ac1b9871167f
2017-11-07 13:13:12 -05:00
Nathan Ridge
daad877559 Bug 526684 - Use InstantiationContext.setExpandPack() in CPPTemplates.instantiateTypes() if appropriate
InstantiationContext.setExpandPack() and related methods were introduced
in bug 486971 to ensure that when instantiating a type list that
contains a pack expansion, with a parameter map that maps the template
parameter pack that appears in the expansion to another parameter pack
(which can happen when e.g. instantiating an alias template with
dependent arguments), the pack is expanded in the correct place.

However, bug 486971 only added use of this machinery to CPPTemplates.
instantiateArguments(). We can also instantiate a type list in
instantiateTypes() (used e.g. when instantiating the parameter types
of a function type), so the machinery needs to be used there as well.

Change-Id: Iabb458e8e3166c15ed922656fc0729a4a8cf8bbf
2017-11-07 12:11:24 -05:00
Doug Schaefer
76e1842644 Implement ordering of toolchains.
Introduce toolchain types independent of providers.

Change-Id: I2cf3145920fcf4e7132468b6e653d7ea3e211127
2017-11-07 11:01:15 -05:00
Marco Syfrig
9a9e80e115 Bug 526724: corrected deduced type for string literals with u8 prefix
Change-Id: Ibc55f6cbd8f425149598b397a4d2fb90b7ed6b8b
Signed-off-by: Marco Syfrig <marco.syfrig@gmail.com>
2017-11-07 04:22:50 +01:00
Doug Schaefer
69404fdf89 CMake - check for build files, clean up some UX.
Starting for Ninja, check for build.ninja file on whether to run
CMake again. Need to do same for makefiles. Change default to run
cmake --build instead of hardcoding ninja or make. Added message
to the end of the build to know when it's done.

Change-Id: Ibbb352ef7c64f6e1fcbe122ef0b73f2c91bb1aa7
2017-11-05 12:14:39 -05:00
Doug Schaefer
45fb622c51 Add the core build gcc ui plugin to the gcc build feature.
Change-Id: I309bf8c785107ad8edd68664d175c7e94a900ea4
2017-11-04 22:31:41 -04:00
Doug Schaefer
87cd8401f4 Hook up the error parser properly in the build configuration.
So we can have the error partitions that work with double clicking
in the build console.

Change-Id: I357f4efb8fd16232b78b18958c9863071feeebcc
2017-11-03 16:48:20 -04:00
Jesper Eskilson
ceeac1865a CDT.setup fixes
* Remove unnecessary version range on bouncycastle
* Replaced
http://download.eclipse.org/eclipse/updates/4.7milestones
with
http://download.eclipse.org/eclipse/updates/4.7
to match cdt.target.

Change-Id: I5b15768d1478666f89d7cbd0ae6c8828674fe6f1
Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
2017-11-02 12:44:59 -04:00
Doug Schaefer
eed39fe4f8 Fix API error in lsp4e.cpp plugin.
Not sure we have the right dependency in the cdt target file but
I get a compile error when I use it.

Change-Id: Ie357ea76da82ac552b6c95662d725fb660434ff6
2017-11-02 11:57:08 -04:00
Jeff Johnston
bd88f34dde Bug 526730 - Autotools should not run autotool commands in the Container
- modify runCommand and runScript methods in AutotoolsNewMakeGenerator
  class to take an ICommandLauncher to use
- modify AutotoolsNewMakeGenerator regenerateMakefile method to
  pass a local CommandLauncher when running autotool commands, but
  using one from the CommandLauncherManager when running configure
  or config.status to do the configuration
- modify RemoteCommandLauncher to add a constructor that includes
  the ICommandLauncher to use if the project is not remote
- fix AbstractAutotoolsHandler to use local CommandLauncher

Change-Id: Ib3f0deff3cca4b7b40459b5dd691d73dcbf2a87c
Signed-off-by: Jeff Johnston <jjohnstn@redhat.com>
2017-11-02 11:20:35 -04:00
Mustafa Yücel
2e0f85e514 Bug 520340: enable CLI to CDT's code formatter
example usage:
eclipse -nosplash -application org.eclipse.cdt.core.CodeFormatter -consoleLog \
        -verbose -config .settings/org.eclipse.cdt.core.prefs src/

imported CodeFormatterApplication from eclipse.jdt.core:
org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java
revision 823698366b88fe7e6c1438813d7dd191ff9aa71f
org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/messages.properties
revision c2646812d22906feca88c2f52911ca7c4eae2299

Change-Id: Id934c8958c66f562bd2402dcbd8b7c60e39cc7a5
Signed-off-by: Mustafa Yücel <mustafa.yuecel@siemens.com>
2017-11-02 07:03:22 -04:00
John Dallaway
ebbe75d37f Bug 361881: Test for undefined reset/delay/halt command
Change-Id: I55c7edf41fa8b1d1cef73254d98e596b04c30b51
Signed-off-by: John Dallaway <john@dallaway.org.uk>
2017-11-01 21:36:21 +00:00
Doug Schaefer
89cb1076e4 Improve when build like autotools is trying to execute a script.
The new Autotools core build executes autoreconf which is a perl
script. We've been assuming up until now they were always
Windows exes or bats. If there's no proper extension, try
finding sh and passing the command to it.

Change-Id: I71ba66d7658db0bdc45608abc356b5efe80669af
2017-11-01 10:42:18 -04:00
Doug Schaefer
3935339cf7 Fix API baseline errors from Command Launcher changes.
Change-Id: Ibc5ba38669832f6baa67ff49ce4fe08ab1f5a14a
2017-10-31 15:57:56 -04:00
Doug Schaefer
bfe7f8f3d7 Fix up MSYS2 autodetect in to use new GCCToolChain API.
Make sure we pass the path to gcc as well as the environment
with the MSYS2/MINGW* path.

Also mark the old API deprecated. Not sure it even works
anymore so we need to move things over.

Change-Id: I1df10a4a77dbdd9027788bc404ae367421673e26
2017-10-31 14:35:42 -04:00
Chin Huat Ang
a974ba9c9e Bug 525591: autotools: Initial core build implementation
Add core, UI and feature plugins for the new autotools project which
uses template wizard and core build.

The template wizard currently supports generating a simple autotools
project as described using a template manifest. 

The project generator sets new autotools nature associated with new
autotools build config provider.

The generated autotools project has been tested to compile fine with gcc
(x86_64-linux-gnu-gcc) toolchain.

Change-Id: I8349999d551bb693725a246340cf46266150fadc
Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
2017-10-30 14:33:06 -04:00
Nathan Ridge
4bf930decb Bug 526391 - Make Database.stringCache a ConcurrentHashMap since it can be accessed concurrently by multiple threads
Change-Id: I79b88197ade9831100b13e5429bfb62248a28f06
2017-10-30 12:46:41 -04:00
Nathan Ridge
acd931e2b6 Bug 525953 - Simplify the implementation of AbstractCodanCMarkerResolution.getProblem()
In the process, the (problematic) assumption the function previously
made that a marker's resource will be a file, has been removed.

Change-Id: I657e1e99d9b06921558ca13960b4fd3ad554911d
2017-10-26 14:05:51 -04:00
Nathan Ridge
e96d2f92c8 Bug 526134 - Recover from failure to parse a base-clause in a class-specifier
Change-Id: I642650020dc2c0363376c8172769f4b5ea2d90c4
2017-10-25 13:14:31 -04:00
Jeff Johnston
c96d126b86 Bug 513589 - Add support to build CDT projects in a Docker Container
- add IOptionalBuildObjectPropertiesContainer interface to use for
  objects that supply optional build properties
- add new IOptionalBuildProperties interface that defines
  optional build properties donated by external plug-ins
- add new
- change IConfiguration to an IOptionalBuildObjectPropertiesContainer
- change IManagedProject to be an
  IOptionalBuildObjectPropertiesContainer
- fix ProcessClosure to ensure that readers are not null before
  accessing them
- fix Container launch delegate to look at project optional
  build properties for active configuration to fetch connection
  and image info and use said info to find a matching
  launch or create a new one
- have Container launch delegate use the image name as part of
  the launch config name
- have Container launch short-cut also use the project's
  optional build properties for the active config to get
  connection and image information before any defaulting
- change AutotoolsNewMarkerGenerator to store the command
  launcher as an ICommandLauncher
- add new CommandLauncherFactory extension to cdt.core that
  allows plug-ins to specify a CommandLauncherFactory that
  will return an ICommandLauncher based on the project
- add macros for new extension to CCorePlugin
- add new CommandLauncherManager class that loads
  CommandLauncherFactory extensions and is used to give
  an ICommandLauncher wrapper that will go through the list
  of CommandLauncherFactory extensions until one returns
  non-null ICommandLauncher
- add code to RemoteCommandLauncher so it will use the
  CommandLauncherManager to get the local launcher
- also change RemoteCommandLauncher to check at execution
  time whether the command is local and in that case use
  the local command launcher
- add new ICommandLauncherFactory interface
- add new ContainerCommandLauncher to launch
- add new ContainerCommandLauncherFactory class for returning
  a ContainerCommandLauncher instance to launch commands
  in a Docker Container
- change MakeBuilder to use CommandLauncherManager to get
  its ICommandLauncher
- change CommandBuilder to use CommandLauncherManager too
- ditto for Builder and AbstractBuiltinSpecsDetector and
  ExternalToolInvoker
- change Configuration to load/store optional build properties
  as well as return the properties to get/set
- ditto for MultiConfiguration
- change ManagedProject to implement IOptionalBuildOptionProperties
  interface
- ditto for ProjectType
- create new OptionalBuildProperties class to store optional
  build properties for a configuration
- bump cdt.docker.launcher to 1.1.0
- use CommandLauncherFactory extension to define
  ContainerCommandLauncherFactory
- add optional ContainerPropertyTab which allows the end-user to
  optionally choose to build a C/C++ project in a Container
  and specify the connection/image to use
- in LanguageSettingsSerializableSettings class, call the
  CommandLauncherManager getLanguageSettingEntries method
  to get the massaged language setting entries based on the
  current list
- in LanguageSettingsProviderSerializer, try and get the
  pooled entries using the cfg description so that it will
  have the project and can use the CommandLauncherManager
  to get entries from image
- in ContainerCommandLauncherFactory move cached headers under
  a HEADERS directory in the plug-in area
  - create a sub-directory for the connection and a sub-directory
    for the image based on cleansed names
  - store the real names of the connection and image to use
    later in the DockerHeaderPreferencePage
- modify LanguageSettingsEntriesTab to force the horizontal
  scroll bar to appear (this is a bug in SWT SashForm support
  and the fix here isn't quite correct, but is better)
- add new DockerHeaderPreferencePage that allows user to
  remove cached headers from images
- change C/C++ Docker preferences to be titled: Docker Container
- fix LanguageSettingsWorkspaceProvider.getSettingEntries method
  to use the CommandLauncherManager so entries will be transformed
  to use cached headers
- add BaseDatabindingModel class
- add DataVolumeModel class to model a volume mount
- add ContainerPropertyVolumes model to model volume specification
  and selected volumes
- add properties to ContainerCommandLauncher to represent
  volumes and selected volumes for a configuration
- add ContainerDataVolumeDialog for specifying a volume
  mount by the end-user
- add a null detector for cfgDescription in
  LanguageSettingsSerializableProvider
- fix AutotoolsNewMakeGenerator.getWinOSType to not specify "." for
  working dir
- fix GCCBuiltinSpecsDetectorCygwin to not map paths to Cygwin if
  the current configuration is enabled for container build
- add logic to ContainerCommandLauncher to look for Windows
  file formats and change them to unix format and map
  any "." working dir to be /tmp
- fix ContainerLauncherConfigurationDelegate similarly
- fix AbstractBuiltinSpecsDetector to pass in the current
  configuration description when getting the CommandLauncher
  since the current configuration may not be the active
  configuration
- change ContainerPropertyTab to add Elf and GNU Elf binary parsers
  when build in Container is chosen so that output executables
  are treated as Binaries by the CDT project
- add documentationl for the ContainerPropertyTab in Build Settings and
  the Data Volume dialog pop-up it brings up
- change CommandBuilder to accept a project as an argument
  to its constructor and to pass this as an argument to
  the CommandLauncherManager
- have StepBuilder pass project when creating a CommandBuilder

Change-Id: Ia78488b93056e6ec7ca83a6c87b3a9d2b9424943
2017-10-22 05:38:51 -04:00
Nathan Ridge
4c1a6e0ccd Bug 486140 - Cast expression with label reference expression as operand
Change-Id: I77d8e7dabc64f68818f4222ffe3d6ba7eebae542
2017-10-21 14:38:48 -04:00
Nathan Ridge
20cebd8f6f Bug 525982 - Have TypeOfUnknownMember implement ICPPUnknownBinding
This ensures that name resolution can proceed when a TypeOfUnknownMember
appears on the left hand side of a scope resolution operator.

Change-Id: I2dfc22eb474b8a2f776eda09ce90c91462d7fe5b
2017-10-20 15:32:58 -04:00
John Dallaway
a80f50a725 Bug 334110: Ensure correct SessionType enabled
The DSF-GDB LaunchUtils rely on
ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE for correct
behaviour.

Change-Id: I12ae2dea6918233dc09848b7bbbedc6304294d1a
Signed-off-by: John Dallaway <john@dallaway.org.uk>
2017-10-20 13:02:16 +01:00
Doug Schaefer
50756f3f18 Fix bugs with emscripten and scannerInfo.
Change-Id: I54d3691426a48c2a6f71fee4188364e57eea402d
2017-10-19 12:52:38 -04:00
Alex Schuilenburg
8a45638df7 Bug 526254: Increase choice of speeds to match that of modern USB Serial
FTDI chips.

Increase the choice of serial baud rates for GDB as modern USB Serial
FTDI chips can reliably support serial baud rates higher than the old
RS232 115200 maxiumum.

Change-Id: If60fd006fdb02d94e86ef2e76a26b56da7a3a067
Signed-off-by: Alex Schuilenburg <alexs@ecoscentric.com>
2017-10-19 15:05:16 +01:00
Doug Schaefer
416fed4d94 Make CMake support more resilient.
Add c++ to GCCToolChain since that's what CMake uses by default for
MinGW. Synchronize the scannerInfoCache loading. Double check for
toolchain files at load time for configs that don't have any.

Change-Id: I8071e285ce5deb1448cabd45f394c62fe6a7f2f4
2017-10-18 12:41:40 -04:00
Doug Schaefer
736d7b5955 Make Qt toolchain selection more resilient.
On my Windows box I have lots of GCC toolchains. Make sure it selects
the one from the Qt install. And fix a few NPEs and things around that.

Change-Id: Ifeeca9271b5055ac773b3b77e372a67e07305130
2017-10-17 11:35:03 -04:00
Doug Schaefer
2198597a98 Make no toolchain error handling more generic and reuse with Qt
In particular when Qt Installs are missing. This is a similar scenario
to when toolchains are missing.

Change-Id: Ic78f71436e46c73900a556133c3883df807784d9
2017-10-17 10:38:23 -04:00
Doug Schaefer
6f06e634c4 Fix up handling of Qt build config defaults.
Don't rely on default properties any more. Make sure we can handle
the cases when the properties are null.

Change-Id: I8b359891286118553399e7635d2ea4b7f147892a
2017-10-16 16:09:41 -04:00
Nathan Ridge
48d5342815 Bug 519121 - Avoid building excessively long type strings in ASTTypeUtil
A type can appear as a constituent of another type multiple times.
For example, in 'A<T, T>', 'T' appears as a constituent twice.

When building a type string for 'A<T, T>', this means the type string
of 'T' will appear in the type string of 'A<T, T>' twice.

If such a duplication occurs at every level of a deeply nested type
structure, the length of the type string can become exponential in
the nesting depth.

To avoid this, an optimization is added where, past a length threshold,
type strings refer to constituent types "by reference" rather than
by containing the contents of the constituent type's type string.

Change-Id: Iaea268449a11b598f113a49fc61e9993bb6451da
2017-10-16 13:53:43 -04:00
Doug Schaefer
5f07698911 Fix Default toolchain name in common build tab.
Change-Id: I5e5ff71556780b05f52a28c9ddcf4537fadeb4f6
2017-10-16 13:49:38 -04:00
Nathan Ridge
1054a38b44 Improve tracking of lookup points
ASTCache now sets the AST as the initial lookup point when invoking
an ASTRunnable.

In addition, OpenDeclarationsJob sets the selected node as a more precise
lookup point.

Change-Id: I9b32fccd80bc1b13e6da49a80a896b595784b868
2017-10-16 13:11:26 -04:00
Nathan Ridge
45101e2a64 Bug 512297 - Improve caching of type strings in ASTTypeUtil
Previously, caching of type strings would only be done during indexing.

Now, it is done every time an AST is available, including operations
like semantic highlighting and mark occurrences.

This is important, because without caching, ASTTypeUtil can end up
rebuilding the same type string many times, leading to quadratic
performance on some code patterns.

Change-Id: I260877f820665cbe0939c0c3065514559592e721
2017-10-15 14:32:18 -04:00
Nathan Ridge
e05566a452 Rename EvalParameterPack to EvalPackExpansion
EvalParameterPack was a misleading name. This evaluation represents
a pack expansion expression; the expansion pattern has to contain
one or more parameter packs, but they can be nested inside an
arbitrarily complex expression.

Change-Id: I16d09c349fc6c2b1086e37fd6743f613f02bf5eb
2017-10-15 14:29:35 -04:00
Nathan Ridge
9792a72dae Bug 525438 - Fix file path comparison in AbstractIndexAstChecker.getLineCommentsForLocation()
Using IPath.toPortableString() was causing a forward slash vs.
backward slash mismtach in the path comparison on Windows.

Change-Id: Ib3eb392065fb473f6b6e70cb1dcddceb34ae7240
2017-10-13 13:53:17 -04:00
Doug Schaefer
f5c0094767 Point help docs run at released 4.7 platform.
Change-Id: I77f0674c38db10f6e2e025737210a8086dc9aca8
2017-10-12 16:54:07 -04:00
Doug Schaefer
affb599f24 Allow for changing manually setting toolchains for build configs.
A number of changes that clean up how build configs are done. Now
build settings are stored with the build config instead of in launch
configs. That makes it less launch bar specific. Add build settings
UI to change the toolchain used for a given launch config.

Also changed CMake so it's IToolchain based instead of property which
doesn't work when multiple IToolchains match.

Change-Id: I958d90ede3c1f873ab1530c2b2880808e8f7abef
2017-10-12 16:03:58 -04:00
John Dallaway
f2115d3a56 Bug 525726: Use GDB/MI for temporary breakpoint
Issue a GDB/MI "-break-insert -t -f" command rather
than "tbreak" to avoid raising a "=breakpoint-created"
event which would trigger the breakpoint synchronizer.

Change-Id: I330f3e69fe096cb16791e4d7de7af92b2c9ccd0c
Signed-off-by: John Dallaway <john@dallaway.org.uk>
2017-10-12 08:16:52 -04:00
Michael Woski
4b3aea7e2a bug 525794 - NPE when invoking Open Declaration in "empty space"
Change-Id: I09a8670d113553c9046d829526149f869f4029a4
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-10-11 16:51:33 -04:00
Nathan Ridge
a20fb38223 Update cdt.target file to point to '4.7' instead of '4.7milestones',
since the latter has been removed

Change-Id: I247c708a4e8f6948824a4a72a1e14e99fa565b60
2017-10-11 14:15:15 -04:00
John Dallaway
78380bf5f7 Bug 525692: Execute run commands before resume
The -exec-continue command must be last in the GDB
Hardware Debugging launch sequence to ensure any run
commands are executed before application code.

Change-Id: I1eae32698e80d1c1b36da4bbdf21d85d363bcd05
Signed-off-by: John Dallaway <john@dallaway.org.uk>
2017-10-08 12:37:08 +01:00
Doug Schaefer
11dcec43f2 Add UI tests plugin for CMake. Fix a couple of bugs it found.
Also restructures the pom.xmls to put the modules in the top level
so we can order them to have the test plugins build after them.

Change-Id: I2f0e4ebd252791fb8844cdf0f635d574946207aa
2017-10-06 16:36:51 -04:00
Jonah Graham
cfd6e9867e Bug 525666: Fix NPE when DebuggerConsole closes before async code can run
Fix the async calls that can run after the DebuggerConsole is closed
and removed so that they can't NPE.

Change-Id: I7905ee18a92be0ff5de25a4c8d770a694b06bfe1
2017-10-06 10:59:19 -04:00
Jonah Graham
94b8301bbc Bug 525667: Allow IGDBFocusSynchronizer to be an optional service
All the uses of the service in the code base allow it not to exist,
so allow the service not to exist at launch too.

Change-Id: I907038907e87d5fbc882272b6e41cd1587617281
2017-10-06 10:59:13 -04:00
Jonah Graham
7af3055b85 Bug 525664: Add missing close in new Debugger Console
On Windows the PTY's waitFor will be blocked (and therefore not
see debugger termination) until the handle to stream is closed.

Change-Id: Ifa079a064733a12a03b07c3e7361e1d19d2b8be8
2017-10-06 10:59:06 -04:00
Thomas Corbat
07e8917eb5 Bug 525645 - Named type specifiers in friend declarations
Change-Id: Ia67fb35ef3d20cde97322c07e697e3437c6c769d
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-10-06 09:41:53 -04:00
Michael Woski
a7be934ba2 bug 525288 - resolve partial template specializations in
CSourceHover/OpenDeclaration

Change-Id: I61c06fc453499ddc2b1af73a8a69d4b648d473c3
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-10-05 17:58:21 -04:00
Nathan Ridge
89ebafa72e Bug 512297 - Decrease the template instantiation depth limit to 128
The previous limit of 256 was not sufficient to prevent stack
overflows in some cases.

Change-Id: Ied9171ed3020f2de7932fa9ee50780bd207d8707
2017-10-04 12:21:20 -04:00