Instead of an indiscriminate NPE at termination of a launch, handle it
more cleanly with a friendly error message.
Change-Id: Ie37e675c3f5e4883c0b160bfe86c4848f1983fa7
Adds target, launch classes, and launch bar support for targets
intended to upload their code to flash using a Serial Port. The
port is co-ordinated with the Serial Terminal so that the terminal
is paused during the upload.
Also cleaned up the Generic Launch so it's not using the
External Tools launch which has a number of UX issues. This
simplifies the settings and gives us more control. And it's made
reusable for the Serial Flash launch.
Change-Id: I31e9970243fbf1cf22d027bbdb892fde104dbefe
-target-attach on Ubuntu 16.04 / GDB 7.11 does not flush its error
response, leaving CDT hanging in final launch sequence. Sending
a newline to GDB after the target-attach causes GDB to flush the
buffer so CDT sees the error.
Change-Id: I8816ac6c88eeaffc6d243ebdae9eb347cfdc5cf0
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>
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
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
Fix the async calls that can run after the DebuggerConsole is closed
and removed so that they can't NPE.
Change-Id: I7905ee18a92be0ff5de25a4c8d770a694b06bfe1
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
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
Note, can't simply check isDisposed as that still leaves a race
condition between isDisposed call and asyncExec call
Change-Id: I3e0e196d9d1dd9b9c8d4048a1aec55405d6dd6e0
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>
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