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>
(cherry picked from commit 6adc3c29a6)
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
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
Includes splitting out and expanding CommandLineArgsTest
from LaunchConfigurationAndRestartTest.
Change-Id: I19fa97a847d908c1c780ca767cf688f26a51d684
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
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
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
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
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
Make sure Core Build handles the properties set by these tabs
correctly. A bunch of string externalization too.
Change-Id: I54a61b4d2520a0952c43608169747e792826062e
This adds a new service, GDBFocusSynchronizer, that helps keep the
internal GDB selection and the Debug View selection synchronized.
Change-Id: I021b3f65d61e82f6971bdb9232369b6fdf58ea5b
Adds gdb launching for Core Build launches. A common class is created
for things common to run and debug (and probably others).
At the bin directory containing qmake to the PATH var for builds and
launches since that's where the DLLs are.
Adds method and variable to GDBLaunch to override the default
environment.
Change-Id: I3ab3b48a2f99eaed50cdb4cfdc03959e9700abc5
Most GDB MI commands support the "--thread" and "--frame" options, that
tells GDB on which thread/stack frame the command is meant to act-on.
For those that don't, CDT has a mechanism to first have GDB switch
thread (MIThreadSelect) or frame (MIStackSelectFrame), before issuing
the command that will act on that entity. Ironically, those two commands
are wrongly identified as not supporting those parameters, and so are
sometimes sent in duplicate, when a single command including the thread
or frame would be possible. This commit correctly identifies those
commands as supporting the thread/frame parameter.
Change-Id: I6e7fc4e873abe36ad024c7131efda7c0aa89dc44
Since users don't usually care about seeing the communication between
CDT and GDB, we should not show it by default. However, once a problem
happens it would be nice to be able to look at the traces even if they
were previously hidden.
This patch has the gdb traces always enabled, but hides the actual
console from the user. When the user enables the traces, they will be
shown in the Console view, with all previous traces available.
Change-Id: Ifd312aa19e4421b6764169b6199b5e935cf25f87
In the Multicore Visualizer, add the gdb thread ids so that users can
more easily recognize threads
Change-Id: I747e9223d9b689dd6a94d707dd2e5cfdb767764e
The DebuggerConsoleView may be interfering with other views while
bringing it to the top. This is not desirable as many users may not need
to access the features of the GDB CLI.
With this change the view will be shown but not automatically brought up
to the top, so users can find it and select it as needed.
Change-Id: I6a26f3a39d43732659d1db4e1aeb77f3c9e399d9
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
IDebuggerConsoleManager.showConsoleView() was mimicked on
IConsoleManager.showConsoleView() which allows to specify which console
in the view should now be shown.
This makes sense for the generic platform Console view where extenders
could choose to display any kind of console when an event happens (e.g.,
a build console when the build is started). However, in our Debugger
Console case, it complicates things unnecessarily. In our case, we want
to be able to open the view, but the console to show is handled by other
logic such as a synchronizer service.
And if there is a need to change which console should be shown within
the Debugger Console view, then IDebuggerConsoleView.display() should be
used. I think having it in IConsoleManager.showConsoleView() is a
shortcut that is not very useful in our case.
Change-Id: Id66ea5c953e8a7ab603cfc23789a814c1ad821d2
In addition, a new "Preferences" Action is available for
the GDB CLI consoles so the user can easily find/adjust them.
Change-Id: I8d2756683f92ca9b42454906dd600c97e1e07cd2
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
The GDB process streams now stay opened regardless of
the life-cycle of associated console views. This allows to close
the Debugger Console view without affecting the debugging session.
At the same time, closing and re-opening the Debugger Console
causes new console pages to be created, but should not
cause multiple jobs to read from the same input stream.
Change-Id: Ief78aa2053e5a54514773a8f24f0a465364a7351
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
We add the DebuggerConsoleView to the debug perspective but we do not
show it by default. This will allow us to specify the default location
of the console but not show the console unless the user actually
launches a dsf-gdb session.
The default location is specified as "stacked" to avoid taking screen
space when many users may not care about using this view. Users that do
want to use the view a lot, will simply move it to its own space.
Change-Id: Ie7ad961193b7f72d3557022410343e325ae2af0e
The bug mentioned above mentions a couple of problems,
1) The use of TestsPlugin.massageTimeout() is not used consistently in
tests.dsf.gdb
2) The timout values are too optimistic
This first change addresses item 1.
Change-Id: I99162bbfaa099bbc4123594fbda51f8e11be9d10
If the sysroot path contains a space, CDT adds doubles quote to escape
the space (in MIStandardParameterAdjustable class) . But Gdb client (7.5
and 7.11) doesn’t understand the double quotes path.
This patch do not add double quotes when the path contains spaces.
Add test case.
Change-Id: I8c54fa625ce1fb1f1b9249361ca07060b56ba90c
Signed-off-by: Vincent Guignot <vincent.guignot@ingenico.com>
Note that the TextCanvas used by the terminal widget that powers the
full console has a default minimum of 4 lines and 80 columns. We could
change those if we feel that is not adequate, or if we don't want to
have such minimum values at all. This patch leaves the minimum values
as they are by default.
Conflicts:
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/GdbTerminalConnector.java
Change-Id: Iad6339da1726db1102c123c97589f46ae681ffc7
The streams connector provided by TM was located in the o.e.tm.view.*
plugins which bring in the terminals view. This patch implements our
own streams connector so that we don't have this extra dependency.
Change-Id: If2a8bdfbdd87eb9ec5c42180a372634e322ba1c1
We currently cannot interrupt execution with the new console in all-stop
mode. This means that if the user resumes execution then no new
breakpoints can be set from CDT while the target is running; also, the
interrupt button simply does not work.
This patch temporarily disables the new console in all-stop, until we
have the problem fixed.
This also solves the pagination problem as pagination is only enabled
in all-stop mode.
Change-Id: I858268d469923700ae960600cb1dbb062729dc88
Making this change reduces richness of such a console with respect to
menus, toolbar, etc. However, I think the consistency is more
important. Besides, this old gdb console is so poor, I don't expect it
was used much.
Change-Id: I28870192dd51c673f35d6147d5196bc771ebfa55
Splitting out the GDB console into its own Debugger Console view.
The goal of this patch is to allow the user to easily keep the full GDB
console in focus, without having to pin it, as the pin requirement was
not very user-friendly. Furthermore, the user can also use the GDB
console while looking at the output of the program being debugged,
which couldn't not be done without a dedicated gdb console view.
This patch also resolves two issues we had with re-using the platform
console view, which were:
- pin didn't work
- clone didn't work
With this new Debugger console view, there is no pin and no clone.
Change-Id: Ia19132704a2f6618f35ffe47ebb4b8f0028dc9ab
This patch provides a full GDB console in the standard Console view.
The full console is disabled for Windows due to PTY limitations.
The new console will be triggered automatically when using GDB 7.12 (or
its pre-release) and running on Linux.
Known issues with this patch:
- Cloning the console view breaks the console
- Pinning the console view is not supported
- Interrupting execution in all-stop mode fails with the new console
- Pagination causes some events to be lost (all-stop only)
Change-Id: Iee6ef5228ca17bd829eb743cb41a142afe6714dc
After we start gdb we wait to read the gdb prompt "(gdb)". If we never
get the prompt, we eventually timeout after 30 seconds. We then do some
cleanup, but were not killing gdb if it was actually running.
Change-Id: I4a84f1d9e07a358643e91d41d1ca30d876167aef
Originally, we used LaunchUtils.getGDBVersion() to fetch the GDB
version. Because that method was used for any debug session, we didn't
cache the result of it.
Now that we moved the version handling to the GdbLaunch class, and that
this class is unique per session, we can cache the result of the
getGDBVersion(), allowing it to be called more than once.
Change-Id: I1a396134ca5c609224f8abb7b70d1e0866810497
This is the test for bug 494650.
If the test fails it leaves the JVM unterminated so the whole test run
timesout.
Change-Id: I4e50acde1654995efcf0f723d6552b68af177503
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Make GdbSourceLookupParticipant.sourceContainersChangedOnDispatchThread
atomic without requiring the calling thread to wrap the call in a Query.
This prevents a deadlock where two different Executor threads are both
listening to changes on the same launch configuration (e.g. when the
same launch configuration is launched twice).
See Bug 494650 for more details.
This change is a continuation of:
commit 6283890715
Bug 472765: Use gdb's "set substitute-path from to"
Change-Id: I3e3faa7a079db42a709668b45e3ec5b3d473a86d
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>