1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Commit graph

26153 commits

Author SHA1 Message Date
Sergey Prigogin
bb9fe47b10 Added @noreference to the CCorePlugin.getDOM method and the CDOM class
Change-Id: I73119bb3463dc932d0951522645f351dec62fd86
2017-02-15 16:21:04 -08:00
Alvaro Sanchez-Leon
1517b88854 Add a default file to enable/disable tracing for the debug tests
The dsf.debug.options file can be updated to
run o.e.cdt.tests.dsf.gdb with debug information by changing its
corresponding value from "false" to "true".

Change-Id: I1faa5fdb2bfd11ce3e6e599e2cbeefcfa19ce3b6
2017-02-15 17:29:38 -04:00
Alvaro Sanchez-Leon
40aca4d51d Bug 511243 - Tests validating program-interrupt using CLI or MI
The tests validate the use of CLI (i.e. Ctrl-C) or MI (i.e.
-exec-interrupt) to interrupt the target program.

The MI command is used when the target is running in async mode,
which is mandatory when using the Full CLI console.

At the time of writing, async mode is not supported for Windows and
MAC, therefore these tests rely on a new mechanism to override specific
DSF-GDB services.

Change-Id: Ie4ab30f07640d112fff9aec2b4f348a27bfe188b
2017-02-15 16:52:22 -04:00
Marc Khouzam
c0e72388c7 Allow tests to use GDBs with versions of the form 7.12.50.201702140
Change-Id: I97e5cc7d6a702d743eba2d90bd73df8de3375de4
2017-02-15 11:04:18 -05:00
Marc-Andre Laperle
793955eb12 Fix script permissions to executable
Change-Id: I13b869f0f3d2a8a7696732e3827bc53e159cb41f
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-15 10:05:18 -04:00
Marc-Andre Laperle
5fc81ecaf5 llvm: Cosmetics (trailing whitespace)
Also set some project specific preferences for save actions.

Change-Id: I8d9c68fd8f7e4a6e9e874e60c12796e2b9b783bf
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-15 10:04:28 -04:00
Sergey Prigogin
8a079c6639 Cosmetics
Change-Id: I2335d8d96c7e9bec13b98c5ac553fa10dce6d9f4
2017-02-14 20:38:13 -08:00
Sergey Prigogin
2dee53e9c5 Cosmetics
Change-Id: Ifbd153a926898ad3820b6e03cca14555495712fa
2017-02-14 17:02:55 -08:00
Sergey Prigogin
5fe63e30ba Cosmetics
Change-Id: Ie4060b90f9ad492d0aece30d2bc13702fa2a9244
2017-02-14 15:56:02 -08:00
Sergey Prigogin
56e6da621e Bug 512201 - NPE in Organize Includes
Change-Id: I09d7b250697ae3ff00a5f615000512524c74ff01
2017-02-14 15:55:48 -08:00
Marc Khouzam
78c9a0bb5e Validate GDB version in debug tests
Change-Id: Ic8f0b7494a19d20630536dd992ed035f52f0f3e7
2017-02-14 11:01:23 -05:00
Marc-Andre Laperle
f187157456 llvm: Run code cleanup
Mostly organize imports and remove redundant type arguments.

Change-Id: I11e8e76f96a17fa521f3e7f8c8f9e3d645d445b3
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-14 10:36:35 -04:00
Alexander Kurtakov
3744029d4e Update Maven build machinery.
* Build helper maven plugin 1.12 -> 3.0.0
* Jacoco 0.7.7 -> 0.7.9
* Resources plugin 3.0.1 -> 3.0.2
* PMD pugin 3.6 -> 3.7

Change-Id: Ia98aaa4e7d4d9edb7ff27435da8fb1c8811ecd0c
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-02-14 10:54:17 +02:00
Marc-Andre Laperle
0046099052 releng: Make use of Tycho POM-less functionality
This removes a lot of pom.xml from the source tree. This is using the
"POM-less" Tycho functionality.
See
https://wiki.eclipse.org/Tycho/Release_Notes/0.24#POM-less_Tycho_builds

One advantage of this is that you do not need to update the version in
the pom.xml when you change it in the MANIFEST.MF because the pom.xml is
automatically generated. This also reduces a lot of the duplicated
information and pom.xml repetition.

- Maven 3.3 and up is required.
- Only eclipse-plugins and eclipse-features can be pom-less.
Repositories, target and others still have pom.xml.
- New parent poms are added because a parent is necessary directly one
level above the plug-in/feature that will have its pom generated
- Some test plug-ins had to be renamed .test -> .tests because it's
required so that it detects that it's a test plug-in
- Some suites were renamed so that they all use the same consistent name
"AutomatedIntegrationSuite"
- Profiles were added for the more common test configurations. They are
activated by the presence of simple .properties files that only serve to
activate the correct profile. The profiles:
  - One for UI tests (UI present and start in UI thread)
  - One for SWTBot tests (UI present and do not start in UI thread)
Other test plug-ins that are too different are kept intact and still
have
a pom.xml
- Fragments are kept intact since they all have different target
platform configurations

Change-Id: I9d73380eb766f547830c552daf08053a30b1845c
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 23:19:56 -04:00
Sergey Prigogin
f78a7306b3 Bug 512150 - Don't allow indirect inclusion by partner header for test
files

Change-Id: I6d0eb9078b92b4cf6e9345cc58824994dd679324
2017-02-13 20:48:45 -04:00
Sergey Prigogin
e431143a97 Removed an unused method.
Change-Id: Ica6fc7ba71ec039f4a33ca01c5fc1867dfdb54b1
2017-02-13 20:48:21 -04:00
Marc-Andre Laperle
3f0e34177c Bug 511677: Mitigate deadlock closing project during indexer job
A deadlock can occur if a project is closing and an indexing job is
running.
There is a patch on Gerrit that reproduces the lock all the time:
https://git.eclipse.org/r/#/c/90603

Thread #1, closes the project (*workspace lock*), removes the binary
parser for this project. Around the same time...

Thread #2, is just about to start indexing the project
(PDOMRebuildTask).
  It visits the C model to collect source files. Because the binary
parser was removed, it reloads the project description, which triggers a
listener (CExternalSettingsManager) to get a *workspace lock*.

Thread #1 then blocks on cancelling the indexer, which will never happen
because it is blocked on getting the workspace lock.

This deadlock could happen for any code being called by the indexer
thread that gets a workspace lock before the indexer cancels itself.
Because so much code can be hooked up to the C model (extensions,
listeners, etc), it is difficult to guarantee that this will not happen.

- Possible option 1. Changing CExternalSettingsManager to execute
asynchronously (Job) breaks other code that expect the operation to be
synchronous. Doing this also does not guarantee that other code will not
get a workspace lock.

- Possible option 2. Cancelling the indexer before the binary parser is
removed from the map: does not break any tests but only cover this
particular case of the binary parser triggering the project description
reload. Any other code that triggers a project description reload (and
workspace lock) will still be an issue.

Option 2, although incomplete, seems the safest and more reasonable at
this point. Judging by the comments in bug 327126, to fix this properly
would require quite a big effort that I'm not sure anyone would do.

Change-Id: Ida7b45558e4430bc5cc9a1eb5ef25e8d19487c31
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 15:11:49 -05:00
Marc-Andre Laperle
8c02478e71 Update to Tycho 1.0.0
useProjectSettings is now true by default so it can be removed.

See https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0

Change-Id: I63256423942d11b94acb2eba11afe76eb62a9b91
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 15:04:49 -04:00
Marc Khouzam
123508549d Add printouts to debug unit tests
Currently, the debug unit tests only print which GDB version is
requested
and only if tracing is enabled; we have run into bugs where we would
have greatly benefited in easily seeing what version of GDB was
actually launched.

This change makes each test print what version of GDB is requested
and which one is actually run.  It also makes the test print this
information
all the time, one line per test, instead of only when tracing is
enabled.

Change-Id: Id19d625170b4f956d6205929062c280ac3ecc3b8
2017-02-13 12:49:27 -04:00
Marc Khouzam
74d67c7b38 Method to allow customizing the line length in trace printouts
Change-Id: If89987dc3cbfce1d2a329968346b6a3908fa5196
2017-02-13 12:49:13 -04:00
Alvaro Sanchez-Leon
74aa6f4e71 Bug 509577 - [Traditional Rendering] Local variables enclosing markings
may be wrong in Little Endian presentation

The enclosing markings are meant to reflect contiguous regions of
memory,
however the current Little Endian representation in the traditional
render modifies the memory map to attempt to reflect how the memory
would
be loaded into registers with a size matching the cell size.

The markings are therefore unsuitable for for this special case,
this change removes these markings when the Little Endian formatting is
selected.


Change-Id: I1d7879f8b23329b33e2b17e8c8444d1266b9ef0a
2017-02-13 11:20:51 -04:00
Nathan Ridge
11ccc87055 Bug 511726 - Handle unresolved field owner type in CPPASTFieldReference.getFieldPosition()
Change-Id: I0ded6f44f8aad69d54c361432afcb423ed6601b2
2017-02-12 12:20:00 -04:00
Nathan Ridge
2e1f2d475a Bug 511653 - Completion of inheriting constructor in using-declaration
Change-Id: If20d85bd6199e8f08152f3a5801bfb30b61d1d09
2017-02-12 00:04:11 -04:00
Nathan Ridge
c0ba7f6bfb Bug 511658 - Destructor call via alias template name
Change-Id: I64a7ec62a05345983e9e298a6ba735f63385486b
2017-02-11 21:25:10 -05:00
Marc Dumais
ac8224f763 Bug 510773 - [traditional rendering] overlay mangles one in next cell
This patch fixes a variable overlay issue, that causes two overlays to
become mistakenly mangled together.

Change-Id: Idbee5b95f85810144dd71e2a397bd38fcd0bcec5
2017-02-10 13:57:37 -04:00
Sergey Prigogin
2899b9098e Bug 509898 - IndexFileSet.containsDeclaration is slow and is causing UI
freezes

Fixed logging of cycles in IndexFileSet.containsDeclaration.

Change-Id: Ic27b161aacb7706f8f06beb1f876f86100421328
2017-02-09 18:12:17 -08:00
Sergey Prigogin
64f00b9457 Removed obsolete code.
Change-Id: I97aef668d2248103b88c77f03c4481807c0e4286
2017-02-09 13:28:51 -08:00
Nathan Ridge
e20812dc8b Bug 511522 - Navigation to type named by 'auto' in variable declaration
Change-Id: I3f6a35cb2498d7a9de31db7c283027fbc33fe688
2017-02-09 02:20:35 -05:00
Nathan Ridge
ec3ab3016d Bug 511331 - Do not color entire qualified name with problem highlighting
Change-Id: Ic712ec2e03bdf03f5ae97019fb9ae8994c5dec23
2017-02-09 02:20:35 -05:00
Sergey Prigogin
a88b16d124 Bug 399147 - 'Find references' does not find using-declarations
Trigger index rebuild to rebuild corrupted binding reference lists.

Change-Id: I94a68fc260c8543840aa712efc97650152597a0a
2017-02-08 18:56:39 -08:00
Sergey Prigogin
5462bac381 Bug 509898 - IndexFileSet.containsDeclaration is slow and is causing UI
freezes

Added cycle detection to IndexFileSet.containsDeclaration.

Change-Id: I48a596bd680bd4f764739b9170a98c907c41ae8c
2017-02-08 18:24:29 -08:00
Sergey Prigogin
5e793c9b43 Revert "Bug 399147 - Make 'Find Reference' find using-declarations"
The change is invalid since a PDOMName can participate in only one
binding at a time through its BINDING_PREV_OFFSET/ BINDING_PREV_OFFSET
pointers.

This reverts commit 2706699543.

Change-Id: I1a4dd7b189b85a0d9c1cca2660d33ab7351a025c
2017-02-08 12:46:40 -08:00
Marc-Andre Laperle
95e05f485d Remove profiles that helped skip ppc64le
Those profiles were useful when keeping compatibility with Eclipse 4.5
but this is not required anymore.

Change-Id: Ic9ef7beecee1b5bd072ec192048ab409b19844c9
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-08 09:51:43 -05:00
Nathan Ridge
0d35254d82 Bug 511427 - ClassCastException in CompositeCPPClassType.wrapBindings()
Change-Id: Id02d59a67b98131aaa4afc8936f89d0985ef93cf
2017-02-07 21:32:03 -04:00
Nathan Ridge
27775e3393 Bug 475581 - Make AbstractCLikeLanguage.createScanner() not final
This allows extenders to replace the preprocessor.

Change-Id: I8c6a53225608e4a21560b31bed3b5f37291ba612
2017-02-07 21:30:08 -04:00
Sergey Prigogin
c6955df2e2 Bug 511871 - CContentAssistProcessor.createContext may leak index lock
Change-Id: I828c94484c7b1594ba72551b80cd5ed6e6a8576c
2017-02-07 14:48:32 -08:00
Alvaro Sanchez-Leon
d06db08a30 Bug 506073 - Support address "range" when adding a memory watchpoint
Change-Id: If3130ed52df95b0481d95477727fc2f419251ade
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
2017-02-07 13:52:25 -04:00
Marc Dumais
7dbe0de0fe Bug 511727 - NPE in org.eclipse.cdt.tests.dsf.gdb.tests.AutomatedSuite
Change-Id: I5f24d617e1577812ba86e44acf4228192f77ab7f
2017-02-07 09:57:15 -05:00
Marc Dumais
86189eeb86 Bug 510924 - Alt+Enter on breakpoint shows incomplete properties dialog
When using the "Alt-Enter" shortcut with a breakpoint selected, the
properties dialog that is created is missing some fields. This seems to
be caused by the fact that the dialog, when summoned in this way, is
created using a wrong context: an ICLineBreakpoint instead of the
expected CBreakpointContext. That context is then used to fetch
properties from the store, which fails.

This is a naive fix that attempts to work around this by creating a
proper context from the breakpoint.

Change-Id: I2b7c86965d09898dd1cd7eeb3c3f704bb2995e20
2017-02-07 10:55:19 -04:00
Marc Dumais
7f6e7f8c9b Bug 510615 - Launch dialog, handle spaces in gdb path
The path to GDB is set in the launch dialog, under the Debugger tab. If
the path to GDB contains one or more spaces, and is not within double
quotes, GDB will not be found and the launch will fail. 

This patch improves the use cases around the "Browse" button, to select
GDB's path. 

1) if the user clicks on the "Browse" button, the browse dialog will
open in the correct place, no matter the presence of space(s).
2) When GDB's path is selected with the "Browse" button, it's then set
in the "GDB debugger" field. This patch looks at the selected path and
adds surrounding double quotes if there is any space within, and strips
any double quotes if there are no spaces. 


Change-Id: I202f574772965af3a491d449b9e9a97e8c61e2b0
2017-02-07 09:48:23 -05:00
Sergey Prigogin
ff23fc9dbe Cosmetics.
Change-Id: I8c38ac32c7cb4e335e16b92a54eeaf6faa0abfe2
2017-02-06 19:37:44 -08:00
Sergey Prigogin
d6ab03abb9 Bug 511808 - Expand namespaces by default regardless of depth level in
Outline view

Change-Id: I9061ad64e442e8859fd79dbb4bf437443ef545a7
2017-02-06 19:30:01 -08:00
Sergey Prigogin
0be1934cec Removed use of a deprecated class.
Change-Id: I2f0bb36c79974e62fcf06a77ca78954f8103a150
2017-02-06 18:44:50 -08:00
Sergey Prigogin
be08c70459 Removed redundant casts.
Change-Id: I7ba50740e4b63897d77ef0204afa5343314d4916
2017-02-06 18:37:47 -08:00
Alvaro Sanchez-Leon
f6f53aa705 Bug 511243 - MI async mode shall not be activated for all cases when
using GDB 7.12

This solution makes the following changes:

* With GDB 7.12, use async mode as long as the Full GDB console is
supported or if the launch is configured for Non stop mode

* with GDB 7.12, don't always use MI to interrupt the service, use the
CLI when the async mode is off

Change-Id: I92c466e028b400f9054298739cd80efac18bd03a
2017-02-06 15:09:32 -05:00
Jeff Johnston
7d0117d24e Bug 511229 - RFE: Add quick fixes for some basic gcc errors
- change codanMarkerResolution schema to support translatable
  regex statements for matching
- bump cdt.codan.ui version
- add additional codanMarkerResolution extensions to codan.checkers.ui
  to handle some basic gcc error messages with quick fixes
- add QuickFixAddSemicolon, QuickFixRenameMember,
  QuickFixUseDotOperator, and QuickFixUsePointer classes
- add new QuickFixMessages
- add plugin.properties to cdt.codan.checkers.ui to allow the quick
  fix regex matchers to be translated in the future
- change the generic error message for gcc error parser so that the
  column is reported as the problem variable (useful for certain
  quick fix resolutions)
- bump up cdt.core

Change-Id: Ibb24c1a79c4d91ead3fc629ea3d4e7425b4e7f23
2017-02-06 12:33:34 -05:00
Jonah Graham
e93de453f8 Bug 509897: Use View Management for Debugger Console
Change-Id: I509d3b5679e2ab236f8cd09b122ffae603a5fc51
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-02-06 06:15:19 -05:00
Sergey Prigogin
3bb38bf874 Bug 509898 - IndexFileSet.containsDeclaration is slow and is causing UI
freezes

Added debug logging of time spent in IndexFileSet.containsDeclaration.

Change-Id: I4523abac4f56c4284ef03da5e82fd39b6dc1d412
2017-02-06 01:25:19 -04:00
Sergey Prigogin
6ddaed7dd7 Improved tracing code.
Change-Id: I8aeb9085e1de9876ddb078a63ccdbfb17858311b
2017-02-06 00:54:16 -04:00
Sergey Prigogin
0b641f1216 Removed obsolete code.
Change-Id: I698f57e290125aca55bb8c2209dca2a9c4cf745f
2017-02-05 21:23:41 -05:00