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

1465 commits

Author SHA1 Message Date
Alvaro Sanchez-Leon
8f096340f4 Bug 509895 - GdbBasicCliConsole left running after platform shutdown
when launch fails

Change-Id: I45f92c635af0bdb24e2bb88adf4f1df915cb4a0f
2017-01-17 14:01:48 -04:00
Marc-Andre Laperle
fed5bbe01e 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>
(cherry picked from commit 6adc3c29a6)
2017-01-06 16:02:12 -04:00
Jonah Graham
e49517eb7c Bug 509320: Increase version dependency to current o.e.cdt.core.native
Change-Id: Ifc5af78ff92f6bf8b6b06b34fe22295aa10eb37e
2017-01-03 12:52:28 +00:00
Marc Khouzam
b7739323be 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:29:13 -05:00
Jonah Graham
8ae2e13a00 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:09:40 -04: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
Marc Khouzam
c31b45b5cc Remove interim version of GDB for full console
Now that GDB 7.12 is released, there is no need to support an interim
version.

Change-Id: I7ccfb6b544023468c7511841890d20ea6cf2f5bf
2016-11-11 09:51:49 -04:00
Marc Dumais
dc6e3a06ff bug 498782 - [debug] synchronize selection between the DV and GDB
This adds a new service, GDBFocusSynchronizer, that helps keep the
internal GDB selection and the Debug View selection synchronized.

Change-Id: I021b3f65d61e82f6971bdb9232369b6fdf58ea5b
2016-11-10 11:35:27 -05:00
Doug Schaefer
e9beafae10 Add Local Debug for Core Build launches. Qt Path var for Windows.
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
2016-11-09 11:40:17 -05:00
Marc Dumais
735b1ab488 Bug 499230 - Duplicated "-thread-select" and "-stack-select-frame"
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
2016-11-04 10:58:29 -04:00
Marc Khouzam
c7526e8a04 Hide 'gdb traces' by default.
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
2016-11-04 06:21:52 -04:00
Marc Dumais
7181c4b9e9 Bug 501006 - [visualizer] harmonize TID with DV and new GDB console
In the Multicore Visualizer, add the gdb thread ids so that users can
more easily recognize threads

Change-Id: I747e9223d9b689dd6a94d707dd2e5cfdb767764e
2016-11-02 08:05:24 -04:00
Alvaro Sanchez-Leon
cb27913c43 Bug 303808: DebuggerConsole shall not be automatically brought to top
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>
2016-10-31 15:22:42 -04:00
Marc Khouzam
d04019eacd Simplify API that opens the DebuggerConsole
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
2016-10-31 11:18:41 -04:00
Marc Dumais
f8488ac157 Bug 505746 - A colon in the project name causes an NPE
Doubled column character addressed in this patch.

Change-Id: I942fbceeac231b2998fa808266f579509dc55295
2016-10-28 07:02:35 -04:00
Alvaro Sanchez-Leon
6c3779d38e Bug 303808: Move console actions to its own package
Change-Id: I8188f69c08fee284c02aa34c2a4d9f29de3c13e7
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
2016-10-25 15:33:51 -04:00
Alvaro Sanchez-Leon
5ab506c95e Bug 303808: Remove GdbConsoleInvertColorAction and use preferences
Change-Id: Ic99160ff208eb71457093003b4cf070a9dfda540
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
2016-10-25 15:32:54 -04:00
Alvaro Sanchez-Leon
b63adf43db Bug 303808: Add a Preference page for GDB CLI consoles
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>
2016-10-24 21:43:11 -04:00
Alvaro Sanchez-Leon
1cfa38948c Bug 303808: Share GDB process streams among console pages
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>
2016-10-24 17:33:27 -04:00
Alvaro Sanchez-Leon
ce2b583716 Update dsf-gdb test suite to run GDB 7.12
Change-Id: I6a870b443d667b0ecb393c338c826200dcff0cff
2016-10-12 08:37:49 -04:00
Marc-Andre Laperle
1f89d55074 Bug 498941 - GDB preference page can grow huge with long debugger path
Change-Id: Iaacfc18fdb28eee1e64e5de8073114738d25ff79
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2016-10-11 10:52:30 -04:00
Alvaro Sanchez-Leon
bd2fc5fc6a Adding GDB 7.12 to the download-build-gdb.sh script
Change-Id: Iac977f0ab83429cc931f413664c7789bb9c9e913
2016-10-11 10:15:59 -04:00
Marc Khouzam
d758c73e31 Add API filters for default methods added to interfaces.
Change-Id: I1b5339eb5bcf2ce857cce8cadf0315e297a9f8f2
2016-09-23 16:04:53 -04:00
Alvaro Sanchez-Leon
61121782e8 Bug 303808: Add the DebuggerConsoleView to the debug perspective
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
2016-09-23 11:30:07 -04:00
Alvaro Sanchez-Leon
c19640498d Bug 499784 - A lot of timeouts in dsf-gdb tests are too optimistic
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
2016-09-21 14:59:24 -04:00
Vincent Guignot
2b728ed027 Bug 497693/ Sysroot with spaces
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>
2016-09-21 10:01:49 -04:00
Marc Khouzam
2067bdec1a Fix API as per the upcoming 9.1 release
Change-Id: I307f8f3239178415a66f0bed0b63e5b0d7ffe4cd
2016-09-19 16:10:40 -04:00
Alvaro Sanchez-Leon
46d0c9633b Bug 303808: Add a console action for "Auto terminate GDB"
Change-Id: Idf4a3b2c60fce5e318114be423fdc89c327be7bf
2016-09-13 14:30:17 -04:00
Marc Khouzam
28f290e9d0 Bug 303808: Handle resizing of full GDB console
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
2016-09-13 13:44:08 -04:00
Marc Khouzam
10381a74e4 Bug 303808: Remove dependency on o.e.tm.view.*
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
2016-09-13 13:30:57 -04:00
Alvaro Sanchez-Leon
1b7f91a406 Bug 303808: Add base terminal actions to the GDBFullCliConsole
Change-Id: I90967e4e8b16059201d11b509a9737a01dad526d
2016-09-13 11:47:47 -04:00
Marc Khouzam
2388bb65c5 Bug 303808: Disable full console in all-stop mode for the moment
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
2016-09-07 15:39:41 -04:00
Alvaro Sanchez-Leon
e9b297390b Bug 303808: Add a terminate button to the debugger console view
Change-Id: I67b37be1991c564dca961d3d2f85b9ba0da098c5
2016-09-07 15:38:43 -04:00
Marc Khouzam
489be2aa59 Bug 303808: Moving old gdb console to Debugger Console view
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
2016-09-07 15:37:11 -04:00
Marc Khouzam
5e9332c8ab Bug 303808: Add menu context to the debugger console to invert colors
Change-Id: I5f7137cd0372c554afd2861aa42ba3cf0c2ae7ba
2016-09-07 15:28:51 -04:00
Marc Khouzam
999c2e97cc Bug 303808: Add dedicated debugger console view
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
2016-09-07 15:26:43 -04:00
Marc Khouzam
0caa750ef0 Bug 303808: Support for full GDB console
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
2016-09-07 15:23:47 -04:00
Marc Khouzam
5d9eaa604e Bug 500066 - Debug traces can be in the wrong order
Change-Id: I4e28ade1df7d3f35f07bfb95870e7d9c449442fc
2016-08-31 08:37:14 -04:00
Marc Khouzam
259f48a0b9 In case of a hang, cleanup any gdb that was started
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
2016-08-29 06:11:21 -04:00
Marc Khouzam
cd559dafaf Update version to 9.1.0
This commit used the script releng/scripts/ChangeFeaturesVersion.sh

Change-Id: I8274a6e8dd5c0f1e450f07952e138b265a441a62
2016-08-17 10:11:57 -04:00
Marc Khouzam
fbe9807877 Allow GdbLaunch#getGDBVersion() to be called more than once.
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
2016-08-01 22:19:38 -04:00
Jonah Graham
d8a3896101 Bug 498882: Add test for UI deadlock on terminating multiple launches
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>
2016-07-30 07:43:03 +01:00
Jonah Graham
06751579f3 Bug 494650: make method atomic without using a Query
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>
2016-07-29 13:05:07 +01:00