Commit Graph

235 Commits

Author SHA1 Message Date
Eike Ziller
95db30bd3a Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggeritem.cpp
	tests/unit/unittest/unittest.pro

Change-Id: Id2e4e9c2bc87b2556d7c2845aea3fe2fa11b630b
2018-10-22 09:53:54 +02:00
hjk
d0d83f6b31 Debugger: Remove unused DebuggerRunTool::quitDebugger
Change-Id: Id3b59f9651ebc65e3fc7588bea789ccaa96522af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 12:03:41 +00:00
Orgad Shaneh
147a3c27c4 Debugger: Strip QLatin1* where possible
Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:32:31 +00:00
hjk
1c9410e353 ProjectExplorer: Rename 'extraAspect' to 'aspect'
Using aspects is the standard pattern nowadays, there's nothing 'extra'
to them anymore.

Change-Id: I446f9d7b1db58a4899e5e44df33ce51f655e7be4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-02 08:32:51 +00:00
hjk
92325c90ce Debugger: Rename snapshothandler.{cpp,h} to enginemanager.{cpp,h}
That's what they are nowadays.

Change-Id: I1bd6db18f2142ecf488eba51ca739675eac753c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-28 07:38:55 +00:00
hjk
bdc1ea1d74 Debugger: Do not remember persistent layout settings per engine
Fixes: QTCREATORBUG-21006
Change-Id: Id3c2062eb5b42808d666f0fc3620a82666fe14a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-11 08:48:31 +00:00
Ulf Hermann
4ecc46626b FileInProjectFinder/Debugger: Use Utils::FileName for sysroot
Change-Id: Id937f927ba6137fd04f742f31d1b260afbe42db4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-28 07:27:30 +00:00
Ulf Hermann
33a0ab8943 FileInProjectFinder/Debugger: Use FileNameList for search directories
Change-Id: I8f9fa4631fda26e10e6b21abfcba9e5f74d635c2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-27 08:59:11 +00:00
Ulf Hermann
9bbef89cdc FileInProjectFinder/Debugger: Use Utils::FileName for project directory
Change-Id: I5a3f376bea4ee06c6856e614f6f71974c2f5ca87
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-27 08:58:14 +00:00
hjk
0303b84fff Debugger: Fix switch from and to sub-perspectives
Change-Id: I17d3b7eb6416843b7a330da14528f0670cd88452
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-23 12:17:39 +00:00
hjk
263cf4c608 ProjectExplorer: Remove RunWorker::setDisplayName
It has been an obsolete alias for setId for a while and downstream
uses have been adapted.

Change-Id: I467370aa67054599c7771e8275d28e62ddc461fa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:02:22 +00:00
hjk
6ab30dcef7 Debugger: Make qmlServer url again accessible in DebuggerRunTool
Currently needed by GammaRayIntegration.

Change-Id: I0915e4bf02bd9be3f1fe0342b9b9ce543811a9ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-20 11:40:18 +00:00
hjk
7866f62892 Debugger: Fix core file loading
Amends 99e3635ef.

Change-Id: I0146416af32a6464765de008630ca1a1a05231a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-17 12:35:45 +00:00
hjk
3b5ecac238 Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.

The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.

Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.

Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.

The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.

There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.

The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.

There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.

Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-08-17 12:35:15 +00:00
David Schulz
99e3635ef3 Debugger: remove redundant info whether to use cpp debugging
Task-number: QTCREATORBUG-20168
Change-Id: I2a0bfba6aea39da443032fd9ab02869cdc508696
Reviewed-by: hjk <hjk@qt.io>
2018-07-26 06:40:33 +00:00
Alessandro Portale
0558db7b54 Debugger: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-25 12:52:43 +00:00
hjk
0fbb2839f9 Remove ApplicationLauncher::Mode
The actual remaining use was to pop up a terminal in some
setups where Mode == Console, with a default of Gui meaning
"no console". In some downstream uses it was used set to
Console (probably to mean "this helper process does not need
a gui") but then luckily ignored when actually starting the
helper processes.

All cases where the console is useful and requested are
nowadays RunWorkers belonging to RunConfigurations with
a TerminalAspect, so they can directly get the relevant bit
from their RunConfiguration without having it part of
all StandardRunnables.

Change-Id: I1368d5968da5cf672656aebf200ccac8d45335d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 15:08:29 +00:00
hjk
4feb2259d9 Debugger: Code cosmetics
Sprinkling in const and ranged for.

Change-Id: I5d11d57f64140021397c23734c7373544ebebb6f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-31 07:10:47 +00:00
hjk
449a749dd7 Debugger: Move part of debugger ramp-down to DebuggerRunTool
DebuggerRunTool and debugger backend process have (almost) a 1:1
correspondence, unlike engines or the debugger plugin itself.
So it makes sense to accumulate backend start/rampdown login
in DebuggerRunTool.

Change-Id: Ia105283bcdf2641c7e9a401b4146b34c20605ba7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-29 11:59:36 +00:00
Tim Jenssen
b5a4e88485 FileInProjectFinder: Use FileNameList for file names
This simplifies code and reduces the number of conversions between
QString and Utils::FileName.

Change-Id: I47bd86b9ae09b1da37b4e5e604761367ac1ab26b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-24 10:09:26 +00:00
hjk
36b835ff0a Finish merging Runnable and StandardRunnable
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.

Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-23 08:48:36 +00:00
hjk
d6af336a7e RemoteLinux/Debugger: Use SymbolFileAspect
This is/will be optionally available independent of the concrete
run configuration type, so use it.

Change-Id: Ife0e906ff47e916d2f7a9df73af8cdd83635cd65
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-24 06:00:36 +00:00
Ulf Hermann
17d530d60d Make sure we always quote the qmldebug command line arguments
Change-Id: I5ce68c238e0ab05d19715659a9cc2161e51e1a7e
Task-number: QTCREATORBUG-20260
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-16 13:08:45 +00:00
David Schulz
43f02573df Debugger: Use shared TerminalRunner also for CDB
Task-number: QTCREATORBUG-19633
Change-Id: Ic16335de1c5e57da7d9253772bad9e4ade1db926
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-30 11:20:45 +00:00
David Schulz
f33ef0e80b Debugger: automatically add source path mapping for Qt packages
Change-Id: I1199629729e3996adb574089c5db69f1fcf0ccd0
Reviewed-by: hjk <hjk@qt.io>
2018-01-15 13:53:01 +00:00
hjk
c06212a255 Debugger: Use more QUrl in channel-ish interfaces
Change-Id: I978b18b4d79ce927ae4801955558b9f24dbcb64e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-20 09:36:14 +00:00
hjk
21c66ce5fd Combine some SshConnectionParameter members
Combine host, port, username and password into a 'url' member and
add some convenience accessors.

Change-Id: Iddc26ff00dad1285c96aa56f196dbc4febe8e974
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-12-19 14:19:31 +00:00
Tobias Hunger
18f38ff18e Project: Make Project::files return a FileNameList
Change-Id: I75ceb22ac65b8288d824f229d44089cba6fc8ea3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-08 09:09:59 +00:00
hjk
19d93d29a9 Introduce a ChannelProvider run worker
... to provide a set of urls indicating usable connection
points for 'server-using' tools (typically one, like gdbserver
and the Qml tooling, but two for mixed debugging).

Urls can describe local or tcp servers that are directly
accessible to the host tools, if needed port forwarding
could be set up when needed.

Use it as new base for GdbServerPortsGatherer for starters.

Note: Since none of the customization points for actual port
forwarding are currently provided by device implementations
only non-forwarding cases are working right now. Incidentally
this does not affect existing setups, as the only case where
it would be needed (Android/adb) have a complete custom
implementation. The medium-term plan there is of course to use
this new setup here and have the AndroidDevice implementation
only provide the forwarding, not the whole debugging (etc...)

Change-Id: I42c9783348cd430b1c435bbca56329c678ac485c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-11-30 09:32:40 +00:00
Eike Ziller
89f9f22035 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/clangcodemodel/clangutils.cpp
	src/plugins/cpptools/clangcompileroptionsbuilder.cpp
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I0728f08171103259407bbbb35f93b70c2f2e18d0
2017-11-21 13:28:55 +01:00
hjk
c1d3e22511 Debugger: Do not create a new terminal when attaching
... to a running application that already has one.

Task-number: QTCREATORBUG-19302
Change-Id: Id83f840408c26f3db85dbe30dadac9949ce6b660
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-16 13:12:11 +00:00
Eike Ziller
f58a617ea9 Merge remote-tracking branch 'origin/4.5'
Change-Id: Iab6befd5e713289877aa0a47b9ce6bddfb5e2593
2017-11-16 08:49:06 +01:00
hjk
d2e29acdc3 Debugger: Remove explicit GdbServerRunner's "Starting gdbserver ..."
Same (or similar, in case an explicit path is configured)  message
is triggered by the base class, no need for duplicated here.

Change-Id: I1a3e3c386674e98dc0ddd31f1156f7e8254a53c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-14 12:20:59 +00:00
Eike Ziller
2d30d3ddd6 Merge remote-tracking branch 'origin/4.5'
Change-Id: Ib6739725e6b251ea962880e4b72700c5be5a192c
2017-11-14 11:24:03 +01:00
David Schulz
d2784c6805 Debugger: Set inferior device when attaching to running application
The device is needed to properly interrupt the inferior with cdb.

Change-Id: I96f3a7393770be9821d8edd7123c458399d4494a
Task-nnumber: QTCREATORBUG-19253
Reviewed-by: hjk <hjk@qt.io>
2017-11-13 11:25:42 +00:00
Eike Ziller
a9e4e3608e Merge remote-tracking branch 'origin/4.5'
Change-Id: I0194bdeda71e33fd5bc9cb3eb7a9198ae72815ed
2017-11-07 15:10:36 +01:00
David Schulz
ae40f434e8 Debugger: Instruct the user to pick a debugger setting
When neither c++ nor qml debugging is enabled in the run page the
debugger wont start. Print a message to the Application Output pane
describing where the setting is located that enables debugging.

Change-Id: I580139e62c0fb0f4ae518ce818738165b80f8e0c
Reviewed-by: hjk <hjk@qt.io>
2017-11-07 13:08:42 +00:00
Eike Ziller
7f626b1182 Merge remote-tracking branch 'origin/4.5'
Change-Id: Iceaa4ca40b5318744bde8a76c6d3ccca08df71bb
2017-10-25 16:07:21 +02:00
Eike Ziller
7115fc3dc7 Debugger: Fix translation issue
Change-Id: I6e34f5f29c130eec9b25562b7a982ed0ff99781e
Reviewed-by: hjk <hjk@qt.io>
2017-10-23 12:05:19 +00:00
hjk
9f690d814f Debugger: Move start dependency on PortsGatherer to GdbServerRunner
It's always needed and GdbServerRunner knows the PortsGatherer.

This also makes the setup more similar to the QNX PDebugRunner setup.

Change-Id: I5863d2c77cd5c92d0f25682d655c9901b8939c30
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-10-23 09:17:01 +00:00
Leena Miettinen
6c94391e93 Debugger: Fix punctuation in message
Change-Id: I048c2b9f295050cd5a5c6ad9fdebacf7e22c5f9f
Reviewed-by: hjk <hjk@qt.io>
2017-10-20 13:21:47 +00:00
hjk
f521b2428d Debugger: Let the DebuggerRunTool optionally handle the PortsGatherer
Less code in the target implementations.

Change-Id: I759f082eba5eab7f4e8252c0d7b5ec64059ba860
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-10-19 16:02:34 +00:00
hjk
597488bef4 Debugger: Move some code around
Parts of the Debugger engine rampdown mechanisms are
essentially one code path now, don't distribute that
over four classes.

Change-Id: I4c6edbc0db94d1f658b0c1d9c154552f286db876
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-19 14:10:42 +00:00
Eike Ziller
bb9663529b Merge remote-tracking branch 'origin/4.5'
Change-Id: Ie83666bd18e899dabf5190c360027bf02abecdaf
2017-10-19 13:01:12 +02:00
hjk
3d11a27ad0 Debugger: Consolidate "Attach to running process"
Change-Id: I78e89a662140f37f5f9719dbbbff070f1e2fbe84
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-19 08:31:33 +00:00
Orgad Shaneh
371b2bbbab Merge remote-tracking branch 'origin/4.5' into master
Change-Id: Ibcdd1230b40d1ca7a414843ee0f9ae4cddb29f6f
2017-10-17 20:00:44 +03:00
David Schulz
ba54fa8a10 Debugger: Do not override environment when using run in terminal
Change-Id: I4ab30bb81462de34c4c7f9c4ef0b10f7731f5bcc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-16 12:15:11 +00:00
Filipe Azevedo
9ebe266ae5 Add public api to set the inferior environment
This is needed for the GammaRay plugin.

Change-Id: Ia76c02756e9deb6f679c871a5cba1f6fc4c5028f
Reviewed-by: hjk <hjk@qt.io>
2017-10-16 11:49:44 +00:00
Orgad Shaneh
7a04014f9f Merge remote-tracking branch 'origin/4.5'
Change-Id: I2d78020f10aa66fdded63883030313e0c411ce02
2017-10-15 00:23:08 +03:00
Orgad Shaneh
b67bf73dc7 Debugger: Fix run in terminal
setUseTerminal was called before the engine was set. Reordered it.

Task-number: QTCREATORBUG-19056
Change-Id: I43f2aebaf72a904ea3a3bcf03cd41186b191b209
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-10-14 16:35:16 +00:00