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

25613 commits

Author SHA1 Message Date
Doug Schaefer
45019ea780 Add settings to Makefile build configs to build at project root.
Often Makefile projects are intended to be built from the project
root directory, such as ESP32 IDF projects. This adds a setting to
control that.

Change-Id: I151ebf60a7609461d24e192a9d6418fccb737055
2017-11-09 20:35:17 -05:00
Jonah Graham
18f76e8313 Bug 527090: fix bad whitespace on windows
Change-Id: Iba9d1ff94cc1ffa2bc53944256b4562a50f10c5a
2017-11-09 16:35:33 -05:00
Jonah Graham
8e23a6b23a Update Oomph's setup's API baseline to 9.3
Change-Id: Ie711add7a26120d335384e7430d5e38e973b19bf
2017-11-09 15:34:14 -05:00
Jonah Graham
5fd3ddb84d Bug 522367: prevent hang of -target-attach on Ubuntu 16.04 / GDB 7.11
-target-attach on Ubuntu 16.04 / GDB 7.11 does not flush its error
response, leaving CDT hanging in final launch sequence. Sending
a newline to GDB after the target-attach causes GDB to flush the
buffer so CDT sees the error.

Change-Id: I8816ac6c88eeaffc6d243ebdae9eb347cfdc5cf0
2017-11-09 13:40:14 -05:00
Jeff Johnston
5f1962e068 Bug 527019 - Build not running in Container for Managed Make project
- the CommandLauncherManager.CommandLauncherWrapper class is
  designed to figure out what launcher to use after being
  created and a project is set, but it is not built for reuse
- change the CommandLauncherWrapper class to reset the launcher
  back to null when the project gets set so that any reuse
  will be sure to get the correct internal launcher after
  resetting the project

Change-Id: I2c0758ca53f7164d4bbd4a6f738acd7c7c042370
2017-11-09 11:46:28 -05:00
Christian Walther
bacbb7b3c7 Bug 378302 - Only bring build console to top on problem output.
When the "Bring console to top when building (if present)" was enabled
(which it is by default as of bug 447703), the console would come to the
top on every line of output, i.e. constantly during a busy build. That
made it impossible to reach other views in the same part, in particular
the Progress view in order to stop the build.

Instead, only bring the console to the top at the start of the build and
when output arrives that is associated with a problem marker (error,
warning, info).

Change-Id: Iabda4858b443c330e9209c27ea3635b0485c7d98
Signed-off-by: Christian Walther <walther@indel.ch>
2017-11-09 08:48:21 -05:00
Jesper Eskilson
0c11499211 Bug 242705: Fix misaligned breakpoint icon
This commit fixes the "misalignment" of the breakpoint icon by replacing
it with the same icon as JDT uses.

Change-Id: I5a205a095dd37f61774adbf0fc61378ad29fe2bf
Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
2017-11-09 08:42:05 -05:00
Doug Schaefer
7a9163ba6c Bug 512550 - Hide C and C++ Project Wizards and fix canFinish().
Hides the C Project and C++ Project wizards in the wizard shortcuts
for the CPerspective. Also removes them from the shortcut list
in the project navigator. Adds the C/C++ wizard that was missing
from the project navigator.

Also makes sure we pass along the call to canFinish from the new
wizards to the old ones.

Change-Id: I0a5505542fcf9d0eb34fb5fef790fd1e777524b5
2017-11-08 16:18:18 -05:00
Jonah Graham
d98733e23d Bug 520340: Fix @since versions
Change-Id: Ifced09a4376952c8eb2e90d68e8bb35f87b003ef
2017-11-08 14:42:52 -05:00
Doug Schaefer
4ce1f1ca16 Add Makefile Projects to collection of core build project types.
Reuses the old makeNature. Reuses the StandardBuildConfiguration.
Generates a pretty simple project for now. Also handles the case
where you don't want to generate anything, just create an empty or
on an existing source tree.

Change-Id: I2f3cddc85d55792a2c537e37d4bc236a3073d930
2017-11-08 14:11:31 -05:00
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