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>
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>
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
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
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
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>
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
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
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>
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
Ensure that the correct adapter factory is being used for each
adapter type.
Change-Id: Ibd401bb16c6320a49285cae4618a80a1bc318da3
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
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>
When using a `StringBuilder` or `StringBuffer` to create a string message,
using implicit string concatenation inside an `.append()` call will
create a nested StringBuilder for the purposes of creating the arguments,
which will subsequently be converted to a String and then passed to
the outer StringBuilder.
Skip the creation of the intermediate object and String by simply
replacing such calls with `buffer.append(a).append(b)`.
Where values are compile time String constants, leave as is so
that the javac compiler can perform compile-time String concatenation.
Ensure that NEWLINE isn't appended in such a way since it is not
a compile time constant `System.getProperty("line.separator")`
Change-Id: I4126aefb2272f06b08332e004d7ea76b6f02cdba
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>