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

1540 commits

Author SHA1 Message Date
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
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
Doug Schaefer
11dcec43f2 Add UI tests plugin for CMake. Fix a couple of bugs it found.
Also restructures the pom.xmls to put the modules in the top level
so we can order them to have the test plugins build after them.

Change-Id: I2f0e4ebd252791fb8844cdf0f635d574946207aa
2017-10-06 16:36:51 -04:00
Jonah Graham
cfd6e9867e Bug 525666: Fix NPE when DebuggerConsole closes before async code can run
Fix the async calls that can run after the DebuggerConsole is closed
and removed so that they can't NPE.

Change-Id: I7905ee18a92be0ff5de25a4c8d770a694b06bfe1
2017-10-06 10:59:19 -04:00
Jonah Graham
94b8301bbc Bug 525667: Allow IGDBFocusSynchronizer to be an optional service
All the uses of the service in the code base allow it not to exist,
so allow the service not to exist at launch too.

Change-Id: I907038907e87d5fbc882272b6e41cd1587617281
2017-10-06 10:59:13 -04:00
Jonah Graham
7af3055b85 Bug 525664: Add missing close in new Debugger Console
On Windows the PTY's waitFor will be blocked (and therefore not
see debugger termination) until the handle to stream is closed.

Change-Id: Ifa079a064733a12a03b07c3e7361e1d19d2b8be8
2017-10-06 10:59:06 -04:00
Doug Schaefer
d8cc0751ae Update feature versions to CDT 9.4.
Also remove remaining pom.xmls for feature projects.

Change-Id: I78d6335f92d70ad2699b8a25801ff72d2935aefe
2017-09-11 11:18:42 -04:00
Jonah Graham
5acb4c10d8 Bug 520952: Use filename when handling function breakpoints in console
Change-Id: I6bcdc658bf4c9453cdbe156808b292296a214fde
2017-08-15 08:35:46 +01:00
Jonah Graham
41b5a72c73 Bug 518699: cleanup platform breakpoints between tests
Ensure no platform breakpoints are left over from previous tests

Change-Id: I3266636e9014d4930ec72f7411c9a4dc737d0d9f
2017-06-23 14:06:03 +01: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
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
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
Jonah Graham
121d748c2c Bug 516053: Enable extending of MIBreakpointsManager/Synchronizer
This involves API improvements and documentation to allow extenders
to extend these DSF services.

Change-Id: Ieb87a6fca757794c9f950d610bb6999e8a86e30d
2017-05-05 09:51:19 -04:00
Jonah Graham
903da92803 Bug 516244: Allow subclasses to provide the current CLI context
Change-Id: I8138f16bb57433af1690dbd77a735c810cef052f
2017-05-05 09:42:33 -04:00
Jonah Graham
d4ecd37bb1 Bug 516053: Allow MIBreakpointDMData to be extended
New API to allow third-parties to extend MIBreakpointDMData with their
own custom Breakpoint handling.

Includes deperecating of MIBreakpointNature that was not used anywhere
in CDT except within internals of MIBreakpointDMData. It arguably
should never have been API in the first place.

Change-Id: I6bcdf2ccaa28d15835ab022648b9b4b0aa7498a7
2017-05-05 08:35:48 -04:00
Jonah Graham
a36ecd3839 Bug 516053: Allow MIBreakpoint to be extended
New API to allow third-parties to extend MIBreakpoint with their
own custom Breakpoint handling.

Change-Id: I64abfc41916a2053cfbed7e3db2357fbf2572050
2017-05-05 08:32:35 -04:00
Jonah Graham
6edd1c6a53 Bug 499778: Stop losing stacktraces in tests
Rather than try/catch/fail just let exception cascade so that the full
stacktrace is available in the test results.

The braces have been left in place for scoping and to minimize changes.

Change-Id: I5407829ea964f828e3f996794489a7b884de25fb
2017-04-28 21:11:27 +01:00
Simon Marchi
9462c1db24 Bug 399494 - Consider all variable objects as not complex
There are cases where we consider some variables as complex when they
are not.  In particular, if a pointer is declared using a typedef, is
will be considered complex with the current code.  This is because it
has a child (the pointed value), but CDT doesn't know it's a pointer.

One of the consequence is that we assume the value is not modifiable.
Therefore, we won't update its value when it changes, and we won't let
the user edit it.

Initially I thought it would be safe to assume that variables with two
or more children are complex, but pointers to structures have as many
children as the structure has fields.  Therefore, a pointer to a
structure, declared as a typedef, will still be wrongfully considered as
complex.  Since there's no easy way to know for sure whether a variable
is complex, just assume everything is simple.

I added a test to verify that the value of a pointer declared using a
typedef will update correctly in CDT as it changes in the program.
There are two distinct scenarios, pointers that are variables and
pointers that are fields of structures.  Instead of adding content to
testUpdateOfPointer, I decided to make a similar test method,
testUpdateOfPointerTypedef.  The original test method was getting too
long and was difficult to follow.  I think it's good to keep them short
and focused.

Another test verifies that the same kind of pointer can properly be
written/modified by the user.

Change-Id: If43b3b6e49cd4a20ea929c2a096745a32de14cd0
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-04-28 10:59:24 -04:00
Jonah Graham
6473183440 Fix typo in javadoc
Change-Id: I24a3a59423b8c9a153abc9e4d99f94d7760aa3a2
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-04-26 05:03:08 -04:00
Jonah Graham
98a578cf94 Bug 515768: Don't install BPs that are entirely filtered
This check already existed for modifying breakpoints, but didn't exist
for creating new breakpoints or installing initial breakpoints.

Change-Id: I5ff5ce0b3ac603ccffa49bd98d60f7202505a7bd
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-04-25 14:42:47 +01:00
Jonah Graham
a797534968 Bug 515756: Allow extending classes to provide getFilterExtension
This affects the synchronizer as it now should defer to the manager
to get the filter extension, instead of trying to load it directly.

Change-Id: I0e646f115ba089453c56f2cc356a4e0a99a1a3b7
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-04-25 12:08:22 +01:00
Jonah Graham
fffe6bbf80 Bug 515653: Fix SWT disposed exception
Change-Id: I2d39961189552602464ee96e0464eba060fcfb03
2017-04-24 07:35:06 -04:00
Jonah Graham
1670530ffb Bug 515307: Run test order of magnitude faster
Remove massage timeouts for places waiting for no events
This is a partial revert of c19640498d
which was part of Bug 499784.

Change-Id: Ib66ed5eaf45977d4ffae77358deaf1f593e005c6
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-04-15 03:43:52 -04:00
Jonah Graham
54f2d8770f Bug 515307: Run test order of magnitude faster
The test was much too conservative on how long it waited for an event
to arrive. On my machine the time was 10 ms, so I set a baseline time
to wait of 100 ms allowing time for additional event to arrive.

Change-Id: Ic435d360e8781936682c19b838aeec13fa3d60bd
2017-04-15 03:43:07 -04:00
Jonah Graham
18a6002f07 Bug 515304: profiles to parallelize testsuite
Change-Id: I02095334c2176bfb9a2968d91b6175af37123f5b
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-04-14 20:03:36 -04:00
Marc Khouzam
868db5b9b6 Bug 512180: Ensure previous launch is fully terminated
DsfTerminateCommand 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: If26411a5b6e0d35a1c45582e91ba62d24cef6bbb
2017-03-27 15:08:46 -04:00
Marc Khouzam
a66ccee4f0 Bug 379225: Address FindBugs issues for DSF-GDB
Change-Id: Id0bb91c7aaef0e356d1989e1dc949542813d2309
2017-03-23 13:59:28 -04:00
Simon Marchi
184747164d Various enhancements to download-build-gdb.sh
I ran shellcheck [1] on the script and it found various minor things to
improve.

 - Use $(...) instead of `...` to run commands in a subshell.
 - Wrap all variables in quotes, in case there are spaces.

At the same time, I noticed a few other things:

 - Use "#!/usr/bin/env bash" instead of "#!/bin/bash", in case the user
   uses a bash not at /bin/bash.
 - Use "set -o errexit" instead of "set -e" for better readability.
 - Use "set -o nounset" to generate errors if trying to read unset
   variables.
 - Pass CXXFLAGS in addition to CFLAGS, since GDB is now in C++.
 - Use ${CFLAGS:-} instead of ${CFLAGS}, in case CFLAGS is not set
   (because of "set -o nounset").
 - Don't check for result of getopt.  If it fails, the script ends
   immediatly due to errexit.

[1] http://www.shellcheck.net/

Change-Id: If73f3510e46ca80d542d47c29c55b48b8b0bc697
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2017-03-23 13:33:45 -04: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
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
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
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 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
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
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 Khouzam
78c9a0bb5e Validate GDB version in debug tests
Change-Id: Ic8f0b7494a19d20630536dd992ed035f52f0f3e7
2017-02-14 11:01:23 -05: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
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
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