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
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
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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
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
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>
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
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
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
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
- 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>
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
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
This commit also enables a richer set of enablement checks when
contributing ConsolePageParticipants to the Debugger Console view.
Change-Id: I34aa010fd9cfa91f24781e2bef5ba41b9525eab0
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
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
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
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>