1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 17:35:35 +02:00
Commit graph

25447 commits

Author SHA1 Message Date
Jeff
49c2109ff6 Fix specs detection for Container Build feature
- sometimes specs detection will be for a non-active
  build configuration so the project cannot be used to
  determine eligibility for the command launcher
- change ICommandLauncherFactory to accept an object in its
  getCommandLauncher method which can either be an IProject or
  ICConfigurationDesription
- change ContainerCommandLauncherFactory to accept an Object
  instead of IProject in its getCommandLauncher() method
- cast the Object received either to be an IProject or
  ICConfigurationDescription to determine if the build should
  occur in a Container or not
- fix CommandLauncherManager.getCommandLauncher() to accept
  and pass on an Object to the list of ICommandLauncherFactory
  instances
- fix AbstractBuiltinSpecsDetector to pass in the current
  configuration description when getting the CommandLauncher
  since the current configuration may not be the active
  configuration
2017-06-27 16:10:01 -04:00
Jeff
0c1c44a47d Add Windows support for CDT Build in Container
- 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
2017-06-22 18:10:11 -04:00
Jeff Johnston
35b02e5aed Fix ContainerPropertyTab to handle no images 2017-06-22 18:10:11 -04:00
Jeff Johnston
1841c84420 Add volume specification for ContainerPropertyTab
- add BaseDatabindingModel class
- add DataVolumeModel class to model a volume mount
- add ContainerPropertyVolumes model to model volume specification
  and selected volumes
- add new properties to ContainerCommandLauncher to represent
  volumes and selected volumes for a configuration
- add new ContainerDataVolumeDialog for specifying a volume
  mount by the end-user
- add code to ContainerPropertyTab to support specification of
  volumes to mount when building

- add a null detector for cfgDescription in
  LanguageSettingsSerializableProvider

Change-Id: I54db9afe608475514f60e9dd9e6c6b8bec1d3137
2017-06-22 18:10:11 -04:00
Jeff Johnston
5dce123041 Fix containerBuild branch to work with latest Linux Tools master
- fix ContainerPropertyTab changeEvent() method to match new
  format for IDockerManagerListener
- ditto for ContainerTab
- add "seccomp:unconfined" option when launching the gdbserver
  for debugging to avoid issue with using ptrace in Container

Change-Id: I2b07b64ba3f9e26b27e5100e357556d99c5272dc
2017-06-22 18:10:11 -04:00
Jeff Johnston
eb561ddbf8 Multiple fixes for indexing support
- fix ContainerPropertyTab.performApply to be ready for a null
  enablement property which occurs when Apply is hit on another
  tab page
- fix LanguageSettingsWorkspaceProvider.getSettingEntries method
  to use the CommandLauncherManager so entries will be transformed
  to use cached headers

Change-Id: Ib2bb283d768905716e7fb37fd598aeace7832b2d
2017-06-22 18:10:11 -04:00
Jeff Johnston
b04c4b68ef Make modifications for CDT Container in Build indexing support
- change ContainerPropertyTab to have a performApply and
  performOK method so that gcc specs detection is performed
  in either case
    - in performOK, only clear the current specs since the
      change of the project description will cause the regeneration
      to occur
    - in performApply, clear specs and send a null event to handle
    - calculate whether specs calculation is actually needed based on
      changes to the original configuration
- 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

Change-Id: Ic577f0fdbb89f68aa88146e6c0f5aa95d75694bd
2017-06-22 18:10:10 -04:00
Jeff Johnston
9a262a6cd4 Refactor CommandLauncherFactoryManager to CommandLauncherManager
Change-Id: I254abdb6a3e749050cb25f5ed68c672462506475
2017-06-22 18:10:10 -04:00
Jeff Johnston
00a7db1c4d Add indexing support for CDT Build in Container
- in LanguageSettingsSerializableSettings class, call the
  CommandLauncherFactoryManager 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 CommandLauncherFactoryManager
  to get entries from image
- add getLanguageSettingEntries method to CommandLauncherFactoryManager
  to convert include paths to locally cached paths copied from
  image
- add verifyLanguageSettingEntries method to ICommandLauncherFactory
- fix copy header logic in ContainerCommandLauncherFactory
- add verifyLanguageSettingEntries method to
  ContainerCommandLauncherFactory that looks to see if the
  project is currently enabled for container build and any
  include path entries are ones that have been copied over as
  part of a CopyVolumesFromImage job in which case they are
  replaced in the entries list
- fix the ContainerPropertyTab performOK method to always
  refresh the builtin specs for the time-being so switching
  can be done between container and regular build

Change-Id: I004e916253cbaae9c6dfed1ef4f5844678fe0dd9
2017-06-22 18:10:10 -04:00
Jeff Johnston
150fda824d Fix step builder make invocation that isn't using Container
- change CommandBuilder to accept a project as an argument
  to its constructor and to pass this as an argument to
  the CommandLauncherFactoryManager
- have StepBuilder pass project when creating a CommandBuilder

Change-Id: I54073b791fb48a7fd62ce98a93dcfbdcd6d76d2b
2017-06-22 18:10:10 -04:00
Jeff Johnston
e70713966f Add support to copy header files from Container to Host
- add logic in ContainerPropertyTab to kick off gcc specs discovery
  when the OK button is pressed
- also fix bug in ContainerPropertyTab whereby the image name
  was being reset to blank when a change occurred in connection combo
- add setLanguageSettngEntries method to CommandLauncherFactoryManager
- add registerLanguangeSettingEntries method to ICommandLauncherFactory
  and ContainerCommandLauncherFactory

Change-Id: I22f60a5ff42f9312cba42ca4d3b6f78225783378
2017-06-22 18:10:10 -04:00
Jeff Johnston
ed2768aa50 Fix array out of bounds exception in ContainerPropertyTab
- in Connection combo modify listener, just return if the
  Connection combo doesn't have a selection and set
  connection to null and connection name to empty string

Change-Id: Ib6274eb27b9a3128a538da4df520b7b83ce1e575
2017-06-22 18:10:09 -04:00
Jeff Johnston
832347339c Fix Standard Make projects to work
- fix erroneous check in Configuration to use the optionalProps
  variable instead of props
- in ContainerCommandLauncher add the project directory as an
  additional directory so all sources and make macros are
  available to the Container

Change-Id: I13099d246456aa350bebbbae32cc152b3b4598bc
2017-06-22 18:10:09 -04:00
Jeff Johnston
db3ee42b31 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 CommandLauncherFactoryManager 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
  CommandLauncherFactoryManager 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 CommandLauncherFactoryManager to get
  its ICommandLauncher
- change CommandBuilder to use CommandLauncherFactoryManager 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.managedbuilder.core to 8.5.0
- 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

Change-Id: Id4d202d5eeb0dd52e528a45bf44d3e386f67376d
2017-06-22 18:10:09 -04:00
Jonah Graham
195ae12776 Bug 516102: Change DSF tests to run GDB 8.0 tests by default
Change-Id: I868d58fd4eeee812fa3e5361561a9eb879a71627
2017-06-22 11:35:13 -04:00
Jonah Graham
8d26859710 Bug 518643: Increase wait for CDT to quit GDB
This is due to a new 500ms delay between inferior exiting and CDT
killing GDB.

Change-Id: I561f69e74caff3e82d89fd8cf2e4babe2c30392a
2017-06-22 11:34:50 -04:00
Jonah Graham
125220eb63 Bug 516102: Add fs_base as new register in GDB 8.0
Change-Id: Ia0600cca38153139fe0b6fb63f087821e0cd336a
2017-06-22 10:49:15 -04:00
Jonah Graham
6e95bbbd58 Bug 516102: Adding GDB 8.0 to the download-build-gdb.sh script
Change-Id: I5ca3e76e57f4b27dce842b08e729e3542b874248
2017-06-22 10:48:01 -04:00
Thomas Corbat
65eda42b16 Bug 518628 Function declarator location misses virtual specifiers
- Change parser to include virtual specifier in function declarator
location
- Change DeclaratorWriter to write all virtual specifiers in their
initial order

Change-Id: Iff381394b834146c1b63877bc9eb84517d31e078
2017-06-22 07:48:33 -04:00
Jonah Graham
d8c3c0967d Bug 518627: Squelch Device Disposed exception at shutdown
Note, can't simply check isDisposed as that still leaves a race
condition between isDisposed call and asyncExec call

Change-Id: I3e0e196d9d1dd9b9c8d4048a1aec55405d6dd6e0
2017-06-22 07:03:34 -04:00
Nathan Ridge
bd4656755c Bug 516338 - Avoid calling instantiateType() on arguments of non-dependent template instances
Change-Id: I51628e9b6ca569943879f48d4c0d0b740bdc23b8
2017-06-20 02:34:07 -04:00
Nathan Ridge
1dceabb0eb Bug 516338 - Detect substitution failure during instantiation of dependent alias template arguments
Change-Id: Ia97e0632e17b4047a0fe35c05be72dab75e43d5c
2017-06-20 02:34:07 -04:00
Nathan Ridge
e374b4b08e Bug 516338 - Have ICPPAliasTemplateInstance implement ICPPTemplateInstance
This allows querying alias template instances for their arguments (for
e.g. instantiating dependent arguments later).

Change-Id: I7cc3dfcef75fe0faf104dc7bfe11e2acd90a4748
2017-06-20 02:34:07 -04:00
Nathan Ridge
8d6cab41e7 Bug 516338 - Introduce alias template specializations
We previously modelled alias template specializations as alias template
instances, which was conceptually incorrect and problematic for a number
of reasons.

Change-Id: Ibca8b87bb3d54cd3ae312254a02e8522e446331d
2017-06-20 02:34:07 -04:00
Nathan Ridge
3e0853ae0c Bug 516338 - Improve typedef preservation
Besides the UX advantages of typedef preservation (such as refactorings
preserving typedefs), it's important for correctness because the
arguments of template aliases can be subject to SFINAE even if they
don't participate in the target type.

Change-Id: I4e71372553dc418d1b8c3e27bd2c0387a41a3269
2017-06-20 02:34:06 -04:00
Doug Schaefer
d6dccc8558 Fix serial port naming on Windows to ensure get() method works.
Change-Id: Ida9b9568280b9530c8e7ff55b45e503889208dd1
(cherry picked from commit 34a3a01259)
2017-06-19 10:21:25 -04:00
Nathan Ridge
bd6da0b03d Bug 486082 - Have ProblemBindingChecker report errors of type IProblemBinding.SEMANTIC_INVALID_TYPE
Change-Id: I58f27a8783ea0dca53da5b45c2da11c6623892fd
2017-06-19 00:26:59 -04:00
Doug Schaefer
bfe45e8c74 Fix another IndexOutOfBounds exception. 2017-06-12 14:35:48 -04:00
Doug Schaefer
4995ccbe24 Fix indexOutOfBounds when no Arduino boards registered.
Change-Id: I9466405bd6b12d795ec6797da7b039aabd851b58
2017-06-12 11:14:54 -04:00
Nathan Ridge
c24e5d17b3 Bug 517954 - ClassCastException in CVisitor.findBindingsForContentAssist()
Change-Id: I0780b422ee727def577f78ed600f66a3ef4728d0
2017-06-08 02:57:45 -04:00
Jonah Graham
68a609fe44 Bug 517908: Don't convert #undef into #include <#undef> anymore
Change-Id: I24b18e050ac91668bd63626ed39f1bf8807f8feb
2017-06-07 04:20:23 -04:00
Jonah Graham
ad97076c4d Bug 517722: Mark as deprecated code related to Launch Group
Change-Id: I8d4b1dd3280011086a8e5b9652ecb7cdede81d52
2017-06-05 12:46:05 +01:00
Jonah Graham
fa142ee04b Bug 517722: Mark CDT specific Launch Group as Deprecated in the UI
Change-Id: Ib945742c6cec83ca9bd9fcb6bc42e32815d74f28
2017-06-05 11:04:48 +01:00
Nathan Ridge
5f937c0bf8 Bug 516648 - Delay storing of the type, exception specification, and parameters of a function specialization in the index until the post-process
This is needed to avoid infinite recursion, and mirrors the way regular
functions are stored.

Change-Id: I72d0c9fb1567cb9d2ba8922d38e17ec63e1fe97a
2017-06-04 18:29:00 -04:00
Doug Schaefer
0084cc2707 Bug 510987 - Properly support PIE executables as build output
When checking whether gathering the build output from a
CBuildConfiguration, if a binary is a shared library and is an
ELF file, dig deeper and see if it has an INTERP section in the
program header. That tells us it's actually a PIE executable and
add it to the list.

As a rider to this bill, improve the error message when a Qt install
can't be found for a given toolchain/target.

Change-Id: I8fd0bf2d204e9425b02916d7b17f4309a5ad9dd5
(cherry picked from commit 14b07f490c)
2017-06-02 12:08:10 -04:00
Doug Schaefer
d3dcd92d8f Bug 517581 Keep env var operation on merged vars the same.
If we are merging two env vars and the operations are both
append or prepend, keep that as the operation instead of
replace.

Change-Id: I758a54b8903eabafac38bf2f3f7d7065c0373e70
2017-05-31 13:07:37 -04:00
Doug Schaefer
63ff83042b Bug 447703 Build Console on top to true by default.
This matches the behavior of every other console provider
I've seen.

Change-Id: I0f1cdb22401bd7e204988df860854956fc57dde4
2017-05-31 11:26:44 -04:00
Jonah Graham
41958c1588 Bug 517516: Update N&N in CDT docs
Includes synchronizing same sections in Standalone Debugger docs

Change-Id: I7b66cc8b16da1f69c943aa922e1cded32346cbaa
2017-05-31 07:39:52 -04:00
Thomas Corbat
7376388a94 Bug 517405 - Marker refresh causes editor to open
Changed isApplicable to not retrieve the TU from the editor if it is not
open. Applying the quick fix will still open the editor.

Change-Id: Ib328ffa2054145eda8b2e72fe646fca2e7fc7905
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-05-30 09:29:48 +02:00
Nathan Ridge
cacb84e277 Bug 514423 - Ensure CodanCReconciler is installed on editors from all windows
Change-Id: I323a78fc1bd3a43270e27be7eb21c13f5a85de9f
2017-05-29 13:18:28 -04:00
Jonah Graham
efa1662b6c Bug 508948: Use environment from Launch configuration when running
Change-Id: I9f37eded44ece4ae25094cf70fa7f90a706e3e69
2017-05-29 08:49:12 -04:00
Jeff Johnston
aab8c277ac Fix Codan quick-fixes
- remove plugin.properties
- move fix-it regexes to bundle.properties

Change-Id: I6d389a12348e35d98c25ae18ca4026e03ea3e41d
2017-05-26 16:35:27 -04:00
Alexander Kurtakov
c04ef7a113 Remove CDI leftovers from docs.
Change-Id: I4e4d16c428d27ff2471f6510400ddb4bf45f3065
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-05-26 14:10:06 -04:00
Alexander Kurtakov
2ac0390091 releng: Enforce JavaSE-1.8 EE for tycho-eclipserun-plugin
Needed as otherwise tycho picks up the java executable from the path and
execs with it.

Change-Id: I44b838454e7faaa0e3bbcdfcd1e66d65ca8b5ac2
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-05-26 12:31:20 -04:00
Marc-Andre Laperle
35d0e13240 Bug 514459 - StackOverflow in PDOMCPPVariable.getInitialValue
Change-Id: Iaee32f03a4fa821979fca1e1ca7b2b272bac1737
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-05-26 11:47:09 -04:00
Alexander Kurtakov
fb61407d48 Rebuild help bundles with 4.7milestones repo.
This is needed so the lucene indexes generated are used in Oxygen. The
current lucene 3 indexes shipped are just ignored by the platform as
lucene 6 can't load them and the data is reindexed.

Change-Id: Ic171dee653c05230f0454f4e736160f02c7eefc0
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-05-26 15:18:40 +03:00
Nathan Ridge
4412c851ab Bug 516686 - ArrayIndexOutOfBoundsException in CPPASTLiteralExpression.computeStringLiteralSize()
Change-Id: I45ce05315c57847bf8ae784b2fe7569a72716894
2017-05-25 20:52:22 -04:00
Nathan Ridge
b0cfef83db Bug 516685 - ClassCastException in CPPTemplates.createInstance()
Change-Id: I9b4ca25afa60a6ed3a79411cc5daa27add3e9cba
2017-05-25 20:51:01 -04:00
Doug Schaefer
0880413e98 Bug 516836 Terminal support for Arduino.
Add Arduino Serial Monitor as a Terminal Connector type. It uses the
Terminal's new cdtserial connector for communication and adds a
config panel that lets you pick the Arduino remote connection to
auto select the serial port. Also switched the Arduino launch
to fetch the serial port out of the global registry to pause and
resume the port while launching. The Terminal does not use the
remote connection to get the serial port.

Note: also adding the terminal as a dependency for builds. Yes,
further adds to our build cycle, but we're dealing with it so far
with o.e.remote.

Change-Id: I5a7cc9ffbf8ae60cd86e0e5440547d12202acbac
2017-05-23 16:41:00 -04:00
Vincent Guignot
e74222b86c Bug 516227: solib-search-path with space fails
If the solib-search-path path contains a space, CDT adds doubles quote
to escape the space (in MIStandardParameterAdjustable class) . But Gdb
client doesn’t understand the double quotes path.
This patch do not add double quotes when the path contains spaces.

Change-Id: I080be17023647dfac2b00296cdd54c7f9499102a
Signed-off-by: Vincent Guignot <vincent.guignot@ingenico.com>
2017-05-23 04:47:59 -04:00