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

25231 commits

Author SHA1 Message Date
Jonah Graham
87c75513e0 Bug 400628: Add extra info to error message
Change-Id: I8102f1ad0fd6f2fc9f83bba8606098cf8f19b893
2017-03-07 15:26:57 -05:00
Mikhail Khodjaiants
cf51cb6b13 Bug 367256 - Debugger doesn't handle invalid breakpoints properly
Change-Id: I4a86015c61164edf9a7840acb40b7b74a4cf8e61
2017-03-07 11:34:58 -05:00
Jonah Graham
6ca1d5cc28 Bug 512180: Ensure previous launch is fully terminated
This has two parts.
1) In the base test itself check that the executor is shutdown.
2) GDBBackend leaves a timeout job on the executor queue, remove
it proactively so the executor doesn't sit around just waiting
for it to terminate.

Change-Id: I9fc10f70031430f4613e0edc95093a60cf695e90
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-03-07 09:21:15 -05:00
Sergey Prigogin
1e60830c7d Allow LookupData.setFunctionArguments to be called more than once
Change-Id: Id716b83a3c7eed980c9b8fff68907ce729a86402
2017-03-06 17:41:21 -08:00
Simon Marchi
e14b87a88f Use line tags in MIExpressionsTest.testUpdateOfPointer
Running to different points of the test program using line tags is
easier and safer than stepping a certain number of times.  Since I want
to modify this test to add a pointer-behind-typedef test, I thought it
would be good to first convert it to line tags.

I also took the liberty of giving more meaningful names to the structure
fields, even though it doesn't change anything in the test.

Change-Id: Ife7e2ae8557789dfc7403df71ba5126ca84b80e0
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-03-06 10:44:15 -05:00
Simon Marchi
808df2490b Make MIExpressionsTest.testUpdateOfPointer use SyncUtil
Modify MIExpressionsTest.testUpdateOfPointer so that it only uses
synchronous methods.  There is no change of behavior intended, the test
should do pretty much the same thing as before, but should be a bit more
readable.

One difference is that we don't need to re-create the
IExpressionDMContext objects when we want to re-evaluate the
expressions (after stepping the 2nd time).  We can just call
getExpressionValue on the again, which will trigger a -var-update.

Change-Id: I09bb914b097888bf3146df0096eb9d824441ffa8
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-03-06 10:44:14 -05:00
Marc-Andre Laperle
277a96f7b7 Bug 511961 - Fix stand-alone debugger product not starting with Oxygen
The order of the auto-started plugins had to be tweaked.

Change-Id: I0f50b5d34ae0f30d8f3dd3fab27d7cb704ed4c9d
2017-03-04 17:05:25 -04:00
Jonah Graham
7e71d2b9b9 Bug 512180 and Bug 501906: Minimize unstable tests
As deleting launch configurations has a race condition that can
cause them not to become undeletable, only delete them for the tests
that they really need to be deleted for.

Change-Id: I040cbc83ba29a9f3a791b0bf4348a3179792ec65
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-03-04 05:35:33 -05:00
Sergey Prigogin
8765065b70 Bug 513105 - NPE in BuiltinOperators.<init> due to
CPPTemplateNonTypeArgument.getNonTypeValue() passing null to
ICPPEvaluation.getValue()

Stopgap measure to protect against NPE.

Change-Id: I1f34a219f982eec3703dc82ef54996a4c454568f
2017-03-03 16:12:40 -08:00
Sergey Prigogin
8e6d9134fe Bug 513106 - EvalUtil.getVariableValue method does not propagate point
of instantiation

Change-Id: I2d60e3e8fb635345115705f3f87631bf7a2f940a
2017-03-03 15:54:50 -08:00
Ghaith Hachem
1d4cf78a0f Bug 447643 Modified the CommandLauncher to consider Win32 Env variables
Added a check on the parseEnvironment() method to store keys in upper
case if the platform is windows
Added a method to fetch a property directly from the fEnvironment or
using the EnvironmentReader class instead of fetching the map and
redirecting the call to that map. This would ensure normalization as the
getEnvVar(key) is implemented to use the normalized map.

Bug: 447643
Change-Id: Ic664d81781f80663ce18854209077a2f38ec7c3a
Signed-off-by: Ghaith Hachem <ghaith.hachem@bachmann.info>
2017-03-03 07:21:29 -04:00
Sergey Prigogin
f311c6f050 More robust infinite recursion protection in CompositeValue.create
Change-Id: Ic0303db73c19651d341f84748b87efc9868defc4
2017-03-01 17:41:12 -08:00
Bruno Medeiros
5a71bf21d8 Bug 449104: Enhance Register Grouping for multi processes
This patch adds support to GDBRegisters for persisting the register
group configuration on a per-process/per-core basis. The default
behavior of GDBRegisters is not modified. Instead, subclasses must
override getPersistenceIdForRegisterGroupContainer(IContainerDMContext)
to enable the new behavior, and provide a persistence id that is stable
across launches.

Update: fixed bug in RegisterGroupDescriptor.getContainerId()

Change-Id: I284df3ee215d9a4a9f72f3dca9aba5c16ca4b850
Signed-off-by: Bruno Medeiros <bruno.do.medeiros@gmail.com>
2017-02-28 15:41:10 -05:00
Marc-Andre Laperle
064ce187b6 lldb: Add some comments
Change-Id: I82a825e8a3d95e895131857d3217c71be2072208
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-28 09:06:48 -05:00
Sergey Prigogin
b868b50c37 Added tracing to CompositeValue.create.
Change-Id: I46b076c2d2fd1b4b0cb490fd3de2ff55e5ec66d7
2017-02-27 20:29:30 -08:00
Sergey Prigogin
68a8cf3205 Minor adjustment to tracing.
Change-Id: I16910a0d8e3fb78ae9fc74fa3b0a87b0c72fc37a
2017-02-27 20:29:29 -08:00
Sergey Prigogin
a98b07b8d3 Moved implementations of deprecated methods from to the IValue interface
Change-Id: I2002d5d3c60d66f15c47a8014f39333291a49a2f
2017-02-27 20:22:51 -04:00
Sergey Prigogin
b97bdab9f9 Fixed a typo.
Change-Id: I64f30d3e8f2565c3fa918b9c4a4508ea043b83d8
2017-02-27 20:22:22 -04:00
Sergey Prigogin
3f8d51e65b Added point parameter to the CompositeValue.create(ICPPClassType) method
Change-Id: Ia3bb0dc48c90496242a696ec7126be2fd71e47fd
2017-02-27 19:21:50 -05:00
Simon Marchi
c7632069df Convert RemoteHelper.remoteFileDownload to use SubMonitor
This patch converts RemoteHelper.remoteFileDownload to use SubMonitor
instead of the deprecated SubProgressMonitor.

The remoteFileDownload operation consists of two sub-operations, to
which I assigned the following weigth:

 - Download the file to the target (95%)
 - Change the permissions (5%)

Ref: http://www.eclipse.org/articles/Article-Progress-Monitors/article.html

Change-Id: I8336f8e853e811a4350f1a63ba64934121ace5d8
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-02-27 19:21:20 -04:00
Marc-Andre Laperle
fd8765e352 Bug 510832 - [lldb] AssertionError terminating session
LLDB-MI sends an extra event when -gdb-exit is used, which
triggers this assertion:
629,511 [MI]  35-gdb-exit
629,514 [MI]  35^exit
629,514 [MI]  =thread-group-exited,id="i1"

For now, work around LLDB-MI bug, see
http://bugs.llvm.org/show_bug.cgi?id=32053

Change-Id: I1c8e7fee118b5bc31e08272c79aa806fe05b7c95
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-25 22:59:25 -05:00
Jeff Johnston
4ba2e8a64b Bug 508319 - "Dummy Page" overrides "C/C++ Build"
- remove Dummy Page from org.eclipse.cdt.debug.application
  plugin.xml

Change-Id: Ia12d64fdba1eaeefbee3fec24d837c184884ec40
2017-02-21 07:30:42 -05:00
Marc-Andre Laperle
00b30bb03a Bug 512096 - Fix NPE selecting an LLVM toolchain in toolchain editor
When a toolchain is selected along with its builder, the builder gets
matched to a “real builder” (ManagedBuildManager.getRealBuilder). If the
builder is abstract, the builder is not in the possible list of matches,
as implemented in Builder.getMatchKey. This causes
getCurrentBuilderCompatibilityInfo to return null which is not handled.

This patch changes the base LLVM builder to a non-abstract one, which
solves this specific NPE.
Also, in order to be more helpful to the user in case it happens to
another toolchain, a null check was added with an error message that the
builder is incompatible. Then at least, it is more clear that something
is wrong and the user can pick a different builder. 

Change-Id: I4d26c568dfe6307b496719c10908a36933fd3ab8
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-19 21:51:36 -05:00
Marc Dumais
5a384894c6 Revert "Bug 512303 - [tests] job debug-tests-master-all-gdb-versions has issues"
This reverts commit ad845e6c3a.

Change-Id: I58e75b3a59b87c3a718aa9cd8fd56afd5188161f
2017-02-17 14:43:04 -04:00
Nathan Ridge
2cd2500957 Bug 512262 - Remove the unnecessary ICPPEvaluationOwner interface
This also fixes some ClassCastExceptions caused by types which
implemented ICPPASTInitializerClause but not ICPPEvaluationOwner.

Change-Id: Ie624865ebe476fe760dc28e02b6aef8a43b4c621
2017-02-17 01:14:35 -05:00
Marc Dumais
ad845e6c3a Bug 512303 - [tests] job debug-tests-master-all-gdb-versions has issues
Disabling test suites MIExpressionsTest and StepIntoSelectionTest for
GDB < 7.5. 

Change-Id: I93b7739fc8c93a90f205122f6332754e99f739ca
2017-02-16 14:10:15 -05:00
Sergey Prigogin
40416c3da4 Cosmetics
Change-Id: I30f57d777d2761343449940087f825a37208c930
2017-02-15 20:02:43 -08:00
Sergey Prigogin
151a4c05e5 Bug 512260 - Organize Includes should prefer .h and .hpp files to files
with other extensions

Change-Id: I115a3441d98d220f0d2b985b7d595971a146e8b6
2017-02-15 20:02:20 -08:00
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