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

1444 commits

Author SHA1 Message Date
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
Jonah Graham
4289aa7b0d Bug 494650: Refactor BaseTestCase to allow multiple launches per test
Bug 494650 has an issues when multiple launches are terminated, at
present the test infrastructure makes it very difficult to launch
multiple launches within one test. This commit refactors the base test
case to enable launching additional tests with doLaunchInner.

Change-Id: I501edf4e485c304b0a00c18f1d5e3813011a0491
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2016-07-28 13:30:03 -04:00
Marc Khouzam
d72b4df3eb Bug 497167: Add support for =thread-group-added event
This will allow us to eventually take action (like prepare the console)
as soon as the user adds a new inferior using the gdb console and the
command add-inferior.

Change-Id: I24ff380b8442de6a88e3caa0fe6832e90e83ac99
2016-07-20 11:08:40 -04:00
Marc Khouzam
25a42fbdce Bug 497592 - Wait for request to GDB for inferior name to be completed
GDBProcesses_7_0 would fetch the name of a process as soon as it learned
of the process through the =thread-group-started event; however, if
there was a call to IProcesses.getExecutionData() before the name was
received, the service would return the wrong name.

This commit fetches the name when IProcesses.getExecutionData() and uses
a CommandCache to do it.  That way, if a call to
IProcesses.getExecutionData() is made before the name is received, the
request will be cached until the name is available.

Furthermore, the cache allows to handle the case where the target is
unavailable, which can happen in all-stop mode and we disabled stopping
at main.

Change-Id: Ia75d3c677e189f87e9ec2864c744a870a0a18407
2016-07-20 11:08:10 -04:00
Marc Khouzam
0c87249a55 Bug 497349 - Reverse debug is always enabled when attaching to a process
Change-Id: I3761e57fb625cab31e013676d3eda7f214496918
2016-07-08 16:21:24 -04:00
Marc Khouzam
5a5e9872cb Bug 497206: Remote-attach fails attach if binary not specified in launch
The core exception we used to throw when the program patch was not
present is necessary for GDBBackend#getProgramPath() to set the path to
an empty value instead of returning null.

Although we could have made GdbLaunch#getProgramPath return and empty
string to fix this problem, I thought we should play it safe and behave
like we used to in case something else needed that exception thrown.

Change-Id: I4684226c731aedef50bdeb37accdf2a2feb818b5
2016-07-08 16:19:41 -04:00
Adam Ward
9b4dba0458 Bug 496415. Show reason for crash when core debugging.
Changes:
When a core debugging session starts a MIConsoleStreamOuput is received
by MIRunControlEventProcessor or MIRunControlEventProcessor_7_0 which
contains a string of the form "Program terminated with signal <signal>,
<reason>". The signal and reason are parsed from the string and a new
signal event created and dispatched. The label of the last executing
thread (one that received the signal) in the debug view then shows the
signal that caused the core file to be created

Testing:
Tested on Windows and a Lubuntu VM

Change-Id: I02fa4b2fe458005f159341fcbcaaaa2fe57a7871
Signed-off-by: Adam Ward <award@blackberry.com>
2016-07-04 14:09:17 -04:00
Marc Khouzam
61492f65a2 Create constant for initial GDB inferior 'i1'
Change-Id: Ie1c0f52b11ac60735365987c89468917e311bf82
2016-07-02 21:01:20 -04:00
Marc Khouzam
e52031c676 Bug 495623: Use new flags in =record-change from upcoming GDB release
With the next GDB (probably named 7.12), we are provided with the type
of record that was started.
  =record-started,thread-group="i1",method="btrace",format="bts"
  =record-started,thread-group="i1",method="btrace",format="pt"
  =record-started,thread-group="i1",method="full"

We make use of this information in GDBRunControl_7_10 to avoid sending
an 'info record' command.

Note that because MI adds fields in a backwards-compatible way, it was
much simpler to modify GDBRunControl_7_10 instead of creating a new
GDBRunControl_7_12 (whose name may even be wrong if GDB's next version
is not actually 7.12).

Change-Id: I869b3c0ff648d5e38081e06a7063613bbb9266dc
2016-06-27 16:03:00 -04:00
Marc Khouzam
783787af25 Bug 496818 - Cannot find executable if working directory is not default
Originally, to determine the program path, GDBBackend's constructor
would call:

   ICProject cproject = LaunchUtils.getCProject(lc);
   fProgramPath = LaunchUtils.verifyProgramPath(lc, cproject);
   
When we made the change in 192bfff688 we
didn't keep that logic and lost some functionality.

This commit re-instates the original logic.

Change-Id: Ifbee2273517c41ad6ebdc9980261ed36d651f130
2016-06-27 15:47:28 -04:00
Marc Khouzam
9e1e981b4d Move the rest of the CDT plugins to java 8
This change was generated using the script:
releng/scripts/ChangeJavaVersion.sh

Change-Id: I2ad96dc682a5acb8529c3edec40de279c331b5a4
2016-06-22 14:51:43 -04:00
Marc Khouzam
0c39193a39 Fix wrong javadoc
Change-Id: Ie4388f47fad9a1ed760fbe4576e01d408c0ca6ba
2016-06-20 14:24:00 -04:00
Doug Schaefer
5d2cbaaa1c Cherry picking changes from the CDT 9 branch for Qt and Arduino.
Change-Id: I85eca2b8bb0447d4dd703030c41d90c1f9bcdf89
2016-06-13 21:23:10 -04:00
Alvaro Sanchez-Leon
39007977fa Adding GDB 7.11.1 to the download-build-gdb.sh script
Change-Id: Ic22f35bb5bac2c3ac1fb394073b168d48259f4f6
2016-06-01 15:54:26 -04:00
Marc Khouzam
93fa9c00a6 Allow to more easily extend GDBControl service.
Change-Id: Iec5ef773222390237d4665fb9bd3daa5b3cae947
2016-05-26 09:39:18 -04:00
Jonah Graham
69d3441795 Bug 494504 - Reverse API changes to GdbDebugServicesFactory
This change reverses the breaking API changes made to
GdbDebugServicesFactory as part of Bug 488909 while retaining the
code cleanup done in that bug.

Change-Id: If269fa5e38e0c019a8f5ce9aa927f27da70f43ee
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2016-05-25 10:33:22 -04:00
Marc Khouzam
9655088708 Provide a timeout for query that might run in UI thread.
GdbReverseToggleCommand extends AbstractDebugCommand so as to be able to
block without risking a deadlock.  However, this only applies to
doExecute() and isExecutable().

GdbReverseToggleCommand has two other methods that use queries, and
those are at risk of a deadlock: isReverseToggled() and
getReverseDebugMethod().  Those queries must have a timeout to avoid any
risk of deadlock.

Change-Id: Ia410b8f102638965ccbf8ac9deda06dc4efc5f0d
2016-05-10 08:48:16 -04:00
Alvaro Sanchez-Leon
08d975066c Bug 492779: GdbLaunch#initialize() catches exceptions, then ignores them
Change-Id: I0d8dbdfbed2477517439466cd3f255ff8ce0fbd1
Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
2016-05-02 15:06:03 -04:00
Mikhail Khodjaiants
f3faebccce Bug 486955 - Add "Stop on startup" option to "Debug New Executable"
dialog

Change-Id: I3f29453e999e19d1e045fe73bc09fd9deb164ac7
2016-04-28 16:03:37 -04:00
Jonah Graham
b2300cbcfe Bug 485107: ensure correct adapter factory is being used
Ensure that the correct adapter factory is being used for each
adapter type.

Change-Id: Ibd401bb16c6320a49285cae4618a80a1bc318da3
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2016-04-27 17:14:03 +01:00
Alex Blewitt
12904409a3 Bug 492304 - Fix NLS warnings
Eclipse warns if a String literal does not have a `//$NON-NLS-<n>$`
entry at the end of the line. However, for historic or formatting
reasons, many such occurrences in the CDT source have an intermediate
whitespace, such as `// $NON-NLS-<n>$`

Fix these so that the whitespace is removed between the // and $
characters.

Change-Id: Idc12398fe6e9d619af1d0b1b73fb8b6180da223c
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-25 22:53:30 +01:00
Alvaro Sanchez-Leon
b2db3a489c Bug 489513 - Show registers in the traditional memory render
Change-Id: I9ddbbeb9c8345f006004d9d2982a778d28c6d68c
2016-04-25 17:03:49 -04:00