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

1472 commits

Author SHA1 Message Date
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
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