Commit Graph

216 Commits

Author SHA1 Message Date
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
hjk
1a1c9bf828 Debugger: Use shared TerminalRunner also for CDB
Change-Id: I2dd9b16f5699d0551a2de3e8ebefc865b98ad862
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-13 12:31:31 +00:00
Eike Ziller
07bec99e8f Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/gcctoolchain.cpp

Change-Id: Iaad0659293681cce4266fc3e4ba2a4f2068de911
2017-10-09 12:09:27 +02:00
hjk
2564e8d782 Debugger: Move core file unpacking into RunWorker of its own
Change-Id: I99b7e6fc8eb9054a4135f693581575c3b8b541df
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 12:21:30 +00:00
Ulf Hermann
fb370f460d Move URL utilities from ProjectExplorer to Utils
This way we can access them from the qmldebug library.

Change-Id: I90ba80228f44a9d5ea825ad59f4bd1572969980e
Reviewed-by: hjk <hjk@qt.io>
2017-10-05 08:54:39 +00:00
hjk
9089b3acbd Debugger: Only set cppEngine if there's any C++ debugging
Fixes a regression introduced yesterday with 58a69c461a.

Change-Id: I9eea3d0adf45e2b65b7d395280ae0e0fbbe01127
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-05 08:11:20 +00:00
hjk
58a69c461a Debugger: Remove DebuggerRunParameter::masterEngineType
It is a fixed value in the respective contexts, no need to track
this 'state' separately.

Change-Id: Id442202ff7a72baf5a2b19ba4bb9dfec5f47fb70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-04 14:06:52 +00:00
hjk
9f3e104e37 Debugger: Simplify QmlEngine construction
Change-Id: Id237998cf2d9a03f9c2929043fdb45ac49d4addb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-04 08:54:10 +00:00
hjk
af63f488c2 Debugger: Simplify CdbEngine construction
Moving the knowledge that this won't work well outside windows
kind of decreases encapsulation, but that's not really worth the
complication of the error handling here.

Change-Id: Idcb6f6d64f33ee8c49a01e62e20aad16d3f01b86
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-29 14:12:54 +00:00
hjk
0c8283234a Debugger: Simplify GdbEngine construction
Change-Id: I4af1cb7d7480b1db68693881254cbc89d985c33e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-28 07:52:16 +00:00
hjk
b11f304ffb Debugger: Remove more non-const acccess to start parameters
Change-Id: I1311b652bb56ef4b9b51cca6b39be2b2215e0074
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-28 07:42:24 +00:00
hjk
895acd23e3 Debugger: Move external terminal into separate RunWorker
Change-Id: Ifb9701f840195ba90db48a0f6fa07b28e0409648
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-27 12:16:19 +00:00
hjk
295d3d7170 Debugger: Avoid use of dummy RunConfigurations
Allow to rely on kit plus data directly specified in the dialogs.

This means, RunControls with nullptr RunConfigurations are allowed
again.

Change-Id: I0b574b397603c0520c8187a8967bff2cf5e20ae8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-26 06:29:31 +00:00
hjk
63e2f9ccdb Debugger: Remove non-const access to RunParameters
The idea is that they shouldn't change after start() to
be re-usable for an additional run later.

Change-Id: I272fc975657b0d8b5b13a07d58bd0b626868d32e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-21 12:46:52 +00:00
hjk
0a226c77b0 Debugger: Replace RunParameter::languagues by individual bools
There was almost 1:1 overlap with DebuggerRunTool::is{Cpp,Qml}Debugging,
use one version only.

Change-Id: I4a8f2b7005d3f2e440cdab3eaf6ac476af894308
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-21 10:33:39 +00:00
hjk
189dbc585e Debugger: Fix misplaced {
Harm was limited, as these were the fallback values for terminal
and working directory that are overridden in all cases with
real RunConfiguations.

Change-Id: I7d3cef1ac814a0ffcf60a8977e0ae13136ea50b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-20 14:10:49 +00:00
hjk
434e895b73 Debugger: Remove parts of the engine parameter fixup phase
The idea is that the fixup should not be needed at all anymore,
instead, static data coming e.g. from the RunConfiguration should
be setup in the constructor, and everything else should be ready
at entry into start().

This also proceeds on path to the planned-but-never-implemented
idea that the RunConfiguration should (at most) be accessed at
RunControl creation time, not later.

Change-Id: I04d622785f5de628a7bb479bc0c39aff7d6cce01
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-20 11:49:15 +00:00
hjk
c4e6678b50 Qnx: Partially fix Attach to Running process
Only works for opened, active project, but better than before.

Change-Id: Icafe3a9605cea29cd16ed4bd316bf195e78efdb5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-18 14:56:50 +00:00
hjk
d2aaa26653 Debugger: Remove DebuggerRunTool::setRunParameters()
It's all coming via individual setters now.

Change-Id: I373f43963e696fa7223f9d664de1df1bc8b021e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 13:01:28 +00:00
hjk
f885785564 Debugger: Remove use of setRunParameters in Qml attach dialog
Change-Id: I90ef143b9c9a0d8606e7d00346c1e508c32a4d88
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 09:58:46 +00:00