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

1502 commits

Author SHA1 Message Date
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
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
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
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
Marc-Andre Laperle
02a04cebad Fix API errors with Eclipse 4.7
- Adding default methods can now be ignored
- Adding fields is now an error but we probably want to ignore this
because it is quite restrictive

Change-Id: Ie57c69f54c64e4913d1498b02e86d00c93f8101a
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-01-30 14:11:36 -04:00
Marc Khouzam
d941a275b4 Add JUnit test to verify a query is answered as expected.
Change-Id: I603a89822e1fcbb1e7126150fd8e4de17fd7a141
2017-01-27 09:32:24 -05:00
Marc Khouzam
8d0a0717e2 Auto-generate source features using tycho.
This commit removes explicit source features and has tycho create them
automatically, along with all other source features that were not
previously defined.  The logic to auto-generate is in the root pom.xml

For all pre-existing source feature, the name presented to the user has
been changed to use the default name used by Tycho, which is "Developer
Resources".  This will provide a more standard user-experience with
respect to other source features built by Tycho.

Existing SDK features are kept for backwards compatibility.

All the names of the auto-generated source features that replace an
existing source feature have stayed the same except for the
'testsrunner' feature; for that one name change, a p2.inf file is added
to allow upgrading from the old named feature to the new named feature.

Change-Id: Ie632e798c93898fd828f88df4983fc43e2749d22
2017-01-25 16:14:03 -04:00
Marc Khouzam
add2a14628 Bug 507950 - Answer query on MI channel to avoid GDB waiting forever
With GDB 7.12, it is possible to receive queries on the dedicated MI
channel.  This channel is not accessible or shown to the user so if we
don't answer, GDB will wait forever.

This patch blindly answers 'y' to any query on the MI channel unless it
has already been answered automatically (which happens when we don't use
the full console).

Change-Id: I0e208fc3495ce6ba57b3e477661f47e50680fd88
2017-01-24 18:15:49 -04:00
Marc Dumais
6d85d40cb8 Adding GDB 7.12.1 to the download-build-gdb.sh script
Change-Id: I52125b13ac3af41b8063fc8dff408d09bbb4c2a6
2017-01-23 10:58:37 -05:00
Marc Khouzam
bfea9deb90 Bug 303808: Example of ConsolePageParticipant for Debugger Console
This commit also enables a richer set of enablement checks when
contributing ConsolePageParticipants to the Debugger Console view.

Change-Id: I34aa010fd9cfa91f24781e2bef5ba41b9525eab0
2017-01-19 15:40:47 -05:00
Marc Khouzam
c8ce2587e8 Bug 303808: Update ConsolePageParticipant for GDB process
This patch officially limits the ConsolePageParticipant to handling
consoles from the platform's console view, and not any consoles from the
new Debugger Console view.  The code currently behaves like this, but
this patch cleans it up and no longer even checks for GDB consoles.

The ConsolePageParticipant used to provide two things for the GDB
console, when it was part of the platform's Console view:
1- it would select the GDB console when the GDB process was selected
2- it would provide a 'save' button for the GDB console

For #1, when the GDB process is selected in the debug view, this patch
selects the same inferior console as when the launch is selected which
is the last inferior console. As for the synchronization of the Debugger
Console views, it is already handled by each console itself.

For #2 the save button must be handled differently based on the
different type of debugger console (basic vs full).  This should be done
in another commit.  Besides, the code, before this patch, was not adding
the save button to the debugger consoles since those consoles are not an
instanceof org.eclipse.debug.ui.console.IConsole as first checked in
ConsolePagePartipant#isConsoleGdbCli()

Change-Id: I0813ad2261633ce8630ab5842f06a047868856e8
2017-01-19 15:27:33 -05:00
Marc Khouzam
d780df14c2 Bug 303808: Make it easier to extend Debugger Console pages
To perform actions on the GdbFullCliConsole, it is important to provide
access to the terminal widget.  This patch adds the new method
GdbFullCliConsolePage#getTerminalViewControl() to give access to the
ITerminalViewControl.

Also, to be consistent with the platform's ConsoleView, this patch also
adds the same groups in the toolbar.  Namely
IConsoleConstants.LAUNCH_GROUP and IConsoleConstants.OUTPUT_GROUP.
Extenders can use these groups to add their buttons to the Debugger
Console view.

Change-Id: I217ce54ada63796de776c6b4cb6b925c3feb7eea
2017-01-19 11:02:17 -04:00
Alvaro Sanchez-Leon
1afc08fea8 Bug 507336 - Dynamic Printf parameters format may not be clear
The Properties dialog displayed for a Dynamic printf breakpoint
display a "printf ("  field, however the end parenthesis is not added
and not expected as part of the parameter list as the ending parenthesis
is added internally.

If the user adds it to complete the opening parenthesis the printf does
not work.

This update adds a validation to this field so if the user adds a final
parenthesis, the dialog will display an error message and the OK button
will be disabled.

Change-Id: Ib25c5a11176c6f92c7367246483be0f703e145bd
2017-01-17 13:43:16 -04:00
Alvaro Sanchez-Leon
028eb67a17 Bug 509895 - GdbBasicCliConsole left running after platform shutdown
when launch fails

Change-Id: I5879f5ed770e63c11077e091f18c5766b243bd88
2017-01-17 12:49:15 -04:00
Marc Khouzam
be7ee1e018 Must use DSF Executor to fetch service.
Change-Id: I3750fe262a3c507d26fb761fa6adad0b715313c3
2017-01-14 08:15:47 -05:00
Marc-Andre Laperle
6adc3c29a6 Bug 509737 - Disable full GDB console on Mac
Until we can figure out a nice fix for it. See bug for the findings
so far. Hopefully this will just be a stopgap.

Change-Id: Id4f7d91645fd25b140d3eb256da5ebdedc1d0e3f
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-01-06 11:23:44 -05:00
Jonah Graham
425e72de58 Bug 509320: Increase version dependency to current o.e.cdt.core.native
Change-Id: Ifc5af78ff92f6bf8b6b06b34fe22295aa10eb37e
2017-01-03 07:30:40 -04:00
Marc Khouzam
9286a1a483 Trigger error in Debug plugins when a package is not exported.
Change-Id: I7a76bb65badee7a949e3d0e9abc27ced228e9b7d
2016-12-21 11:54:36 -04:00
Marc Khouzam
f62d18ae49 Export some packages from o.e.cdt.dsf.gdb.ui
Change-Id: I8919dc303b232b6518e5e99a95f0a3a0dd4807d3
2016-12-21 11:53:30 -04:00
Simon Marchi
955afec343 Fixup for "[dsf-gdb] debug tests: Use line tags where possible"
Unfortunately previous commit was submitted too early. There were
two problems that this commit corrects:

1) clear line tags before each test run - side effect of Bug 508642

When a test marked with Intermittent fails, the next retry is executed
with the same class instance.  Therefore, the new try starts with a
non-empty fTagLocations.  The test trips on the check that there are no
duplicate tags.

2) Fix failing testStopAtMainWithReverse

A blank line got inserted into the test case, that
interfered with the test logic.

Change-Id: If4c28557eac7ee740b4e3a5eac5dd2726c39a35d
Also-by: Jonah Graham <jonah@kichwacoders.com>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-12-04 12:06:00 +00:00
Simon Marchi
c389f49659 [dsf-gdb] debug tests: Use line tags where possible
The goal is to eliminate direct source line number references in tests,
so that modifying test cases is easier.

Change-Id: I9a4964478e9486bff137fb9aec199cee144c2af4
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-12-03 18:08:14 -05:00
Simon Marchi
e8cc363899 MIBreakpointsTest: Factor out breakpoint validation
Almost the same code is used in multiple tests to validate breakpoint
attributes.  We can factor that out in a few support functions.

Change-Id: I819da62cc9e6d7434438574b695131b4cea19c77
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-12-03 17:59:23 -05:00
Simon Marchi
e2c5019896 MIBreakpointsTest: Replace AsyncCompletionWaitor with queries
The queries are less verbose and less error-prone.

Change-Id: I875e7f94436b0284c236b850482f9f5ff4cbebf7
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-12-03 17:29:05 -05:00
Simon Marchi
e5c63c7cd8 gdb build script: Make the script work with non-absolute base paths
There are two problems when passing a non-absolute path to the -b flag:

1. It ends up being used in "./configure --prefix=${base_dir}".
   configure fails, because the prefix must be absolute.
2. It ends up being used to set up symlinks, leading to broken links.

Making the install path absolute fixes those.

Change-Id: I7c1d22754c1a788f02cd912f2114cc091951b303
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-11-22 16:33:01 -05:00
Marc Khouzam
74e932af4f Typo
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2016-11-21 13:54:26 -05:00
Marc Khouzam
c2914e9be9 Add id to GdbFullCliConsole and GdbBasicCliConsole menu
The GdbFullCliConsole has id:  GdbFullCliConsole.#ContextMenu
The GdbBasicCliConsole has id: GdbBasicCliConsole.#ContextMenu

The commit also adds an example of adding a new button to those menus in
org.eclipse.examples.dsf.gdb

Change-Id: If9579e3e60524f39a332df868f512c5f457043ed
2016-11-21 13:22:38 -05:00
Jonah Graham
01b791031c Bug 506382: Be more lenient with GDB protocol error
Due to a GDB bug present in numerous versions of GDB
https://sourceware.org/bugzilla/show_bug.cgi?id=19637
CDT can fail to display advanced memory info and
registers view properly.

This fix is more lenient, and if the user really wants
to see the registers, a workaround for GDB's bug is linked
to.

Change-Id: Ia78947e29a1e446837ef992d470dfd14f047bda2
2016-11-21 04:10:39 -05:00
Mikhail Khodjaiants
cce9a941af Bug 506950 - Moving conditional breakpoint to different location can
break synchronization between CDT and GDB

Change-Id: I29e00ae16aba3f7a3b7e035547ad3bcae29afdf8
2016-11-18 14:55:23 -05:00
Marc Khouzam
92515ff23d Reverse order of versions in gdb build script
When building all gdb versions, the older ones have
a greater chance of failing, so should be done last.

Change-Id: I8bb2f600d84cc7a8f97c308995c174124d881d8d
2016-11-18 07:54:27 -04:00
Simon Marchi
f55a16e8b8 gdb build script: Add missing local variable in check_supported
We use the $version variable in the check_supported function, but it is
not set.  It happens to work because we use the same variable name in
the outer scope, where check_supported is called.

Change-Id: I75e8ae4ef42a232174accf88ca146c0e427f8d4e
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-11-17 10:40:57 -05:00
Marc Khouzam
8cf5ed53f2 Update version to 9.3.0
Change-Id: Ic953ccc5d38ff3661ca44de21ed8c4b7dad5b246
2016-11-15 20:32:51 -05:00
Jonah Graham
03b701c9a5 Bug 494246: prepare command line arguments properly for Windows GDB
Includes splitting out and expanding CommandLineArgsTest
from LaunchConfigurationAndRestartTest.

Change-Id: I19fa97a847d908c1c780ca767cf688f26a51d684
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2016-11-15 16:59:57 -04:00
Marc Dumais
2ae122963c Bug 303808 - Silence error changing thread in all-stop
In all-stop mode for a remote session, it's not possible to have the
target switch thread, while the target is running. At the moment, the
GDB focus synchronizer attempts to switch the thread in that case, when
the user switches thread in the Debug View, which can fail and ends-up
logging an error. 

This patch silences this error.

Change-Id: Ib21347fe9f4c31b3a42b4a83d289dbcd10b74a07
2016-11-15 15:48:34 -05:00
Alvaro Sanchez-Leon
31f0cc6476 Bug 303808: Run all-stop mode with target async on GDB 7.12
The previous all-stop implementation use Ctrl-C (variants) to suspend
the target program.  This option is not supported when using the new
GDB full CLI console provided in GDB 7.12.

So the alternative is to send the mi command -exec-interrupt to suspend
the target, however this option requires the use of target async-on mode
(already in use for non stop mode).

This update makes all-stop mode use target async mode when using
versions higher or equal to GDB 7.12.

This update also removes the non-stop mode restriction initially
implemented for the use of the new GDB Full CLI console.

Change-Id: Iabef20bdee814d413fc338f9ec8c2d99d6311c20
2016-11-15 15:11:56 -05:00
Alvaro Sanchez-Leon
36fd126919 Bug 303808: Add a GDB CLI Console history buffer
Change-Id: Ide52d3223b65323f3e9476d2c280d0ebe6640ba8
2016-11-15 11:34:55 -04:00
Marc Khouzam
334777eb6e Update version to 9.2.0
Change-Id: I36ad4218b20b8ea70584c89f5be45c757bf4c714
2016-11-14 23:50:05 -05:00
Marc Khouzam
39c781f81a Bug 497166: Support the user using the 'run' command in the gdb console
This commit introduces a PersistentPTY.  By using it, we now allow the
user to restart the process from the GDB console (by pressing 'run').
In this case, the I/O will continue using the PersistentPTY.

Previously, the PTY would have been closed, and GDB would fail to
restart the process because it would fail to use the closed PTY.

Change-Id: I395b402e297a2043af8fce33df163eddef9e6c7a
2016-11-14 15:30:23 -05:00
Marc Khouzam
e8480ca0f8 Bug 498782 - add synchronize of process selection between the DV and GDB
This patch synchronizes the GDB focus when the user selects a process
node in the DV.

When the user selects a new process (inferior) from the GDB console, we
are already synchronizing the DV to the thread/frame that GDB selects
from that process.

Change-Id: I11dfd175d51ec49e969f4d07288f80f7ea72a3e1
2016-11-14 10:12:03 -05:00
Doug Schaefer
03051c91ab Implement Qt build tab for the launch config dialog.
Make sure Core Build handles the properties set by these tabs
correctly. A bunch of string externalization too.

Change-Id: I54a61b4d2520a0952c43608169747e792826062e
2016-11-11 16:24:40 -05:00