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
Simon Marchi
a2160bd5f1 Bug 464916 - Add a -pthread checkbox in the GCC C/C++ Linker settings
Change-Id: Ib06482847e88a327b3e3dccf1522d5f8dab1a72b
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-03-17 16:00:29 -04:00
Marc-Andre Laperle
36f66d36b2 Generate config.ini for stand-alone debugger based on debug.product
Before this change, we had to remember to edit the config.ini every time
a dependency was modified in debug.product. This change introduces a
script during the build that generates the config.ini with the same list
of plugins specified in debug.product.

The cdtdebug.sh start-up script was simplified in the process because
the config.ini includes all platform-specific plugins now and they just
won't get loaded if they are not a match for the environment.

Change-Id: I658b0dd8688088e203966a154e6154f1b2c851f4
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-03-17 00:31:07 -04:00
Marc Khouzam
4fe701bcf7 Don't delete the rcp and rcp-repository directories
When building o.e.cdt.repo we used to delete the
entire directory in which we put the build result.  However, it is
possible that the Standalone debugger was built before o.e.cdt.repo and
already put the valid rcp and rcp-repository directories in that
location.  We therefore should not delete those.

Change-Id: I5d1608bceb48633f2205af8f8282e884ff223351
2017-03-16 13:29:50 -04:00
Simon Marchi
9b9bc86f2e Bug 511801 - Remote launch: validate that the remote exec file is absolute
From my experience, bad things happen if the user specifies a
non-absolute path in the box labeled "Remote Absolute File Path for
C/C++ Application".  This patch adds a validation to the tab to make
sure that the path is a valid absolute POSIX path.

This assumes that we do not support remote launching on Windows targets,
and therefore do not need to specify paths such as "C:\foo\bar.exe".

Change-Id: I20367078ff20179f0515272afee17d0986940309
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-03-15 16:30:35 -04:00
Simon Marchi
4802bf3e16 Remote debug: Use the IFileStore interface to force the file executable
Instead of calling "chmod +x" by hand, use IFileStore.putInfo to set the
file attributes.  Since we already use the IFileStore API to copy the
file, it makes sense (and it's cleaner) to use it to set the executable
attribute as well.

In most cases, it wouldn't be needed to make the file executable, since
it should already be on the host filesystem and IFileStore.copy
transfers the attributes.  However, it's still good to force it
executable in case it's not already for some reason.

Change-Id: I4c86e36265962781d4541aaceeb40b502248f674
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-03-15 16:24:37 -04:00
Marc Khouzam
0d62978ce7 Update some target dependencies
Change-Id: Ib0b8ae4f5be2538edc1a7be37a356b415042d578
2017-03-15 05:15:09 -04:00
Sergey Prigogin
c5dc285ca5 Bug 513681 - Unresolved name with a friend declaration in a namespace
Change-Id: I778886f802576a9b8d7804eb32abfe091bf0568d
2017-03-14 20:25:23 -07:00
Sergey Prigogin
8da53f1e5e Bug 509396 - Unresolved symbol with address of overload set containing
function templates

This change fixes the examples contained in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=509396#c0 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=509396#c4

Change-Id: Id5c81469b6700ddc775ab714b0b68d5ea9a809ae
2017-03-14 13:50:03 -04:00
Sergey Prigogin
8bfd2cdc22 Added toString() method
Change-Id: Ieb9e66af1bd290ebe5f8bdce82d0778ea6da2809
2017-03-13 23:15:17 -04:00
Sergey Prigogin
fc6fad911b Cosmetics.
Change-Id: I92903893c481734b42e9292fbc48f1e58d440895
2017-03-13 19:16:45 -07:00
Sergey Prigogin
581182ce98 Minor performance optimization.
Change-Id: I19b1b8f55c8b62fa95eede5318d4b73291dfbd70
2017-03-13 19:13:20 -07:00
Sergey Prigogin
87ce31e19e Code streamlining.
Change-Id: I813c84d316a15727e45293849c21577565fa4afa
2017-03-13 19:40:07 -04:00
Marc-Andre Laperle
902aae8fcf Add missing dependency for stand-alone debugger
A new plugin is required since the last 4.7 milestone build.

Change-Id: Ibf0bb9bc3ed7858dca67782051f53d81c5ace915
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-03-13 14:29:03 -04:00
Sergey Prigogin
f60d78b32d Cosmetics.
Change-Id: I3484969221546dc8d71995c71651bcad95df128a
2017-03-10 14:23:21 -08:00
Sergey Prigogin
1735a17c5e Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Minor code cleanup.

Change-Id: I92ea01711034df5fa88cd41a81a54450fdb0ba6c
2017-03-10 11:52:02 -08:00
Sergey Prigogin
5b22093f47 Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Added precalculation of initial values of non-field variables.

Change-Id: Ie6c0690d90d5725e812d10afa15c4a11ba92f647
2017-03-09 20:48:50 -08:00
Sergey Prigogin
7501266165 Added protection against NPE and invalid values.
Change-Id: I8b2b96acc9f7852a4857eabb81e4ff35f9e3a0a9
2017-03-09 18:34:27 -08:00
Sergey Prigogin
8bdda7bd02 Bug 513345 - A lot of time during indexing is spent inside
CompositeValue.create

Added caching of initial values in CPPVariable and CPPVariableTemplate.

Change-Id: Id56dc273d1b27a972a30021bb8f26ce57443d208
2017-03-09 18:14:00 -08:00
Sergey Prigogin
f144cd407f Added a missing point argument.
Change-Id: Ie07e20efd16f29de67f7510782d3269417b8df93
2017-03-08 16:05:59 -08:00
Sergey Prigogin
212bbd011f Fixed broken compilation.
Change-Id: I0e4355fd8f1547d1e93400215759a5d897924031
2017-03-08 02:01:43 -04:00
Sergey Prigogin
a23515435e Minor performance optimization.
Change-Id: I8a07484cd5159081df2fa743612d4a2b08bdacad
2017-03-07 16:42:33 -08:00
Sergey Prigogin
35e7ae3e05 Bug 513280 - Major performance inefficiency in CPPVariable.getType
In my test project this change reduced total indexing time by half.

Change-Id: I6c7d3adfa1e4d2d05f7f5108f25110f6a9ec9a1a
2017-03-07 19:18:00 -05:00
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