Commit Graph

207 Commits

Author SHA1 Message Date
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
hjk
62ada96091 Debugger: Remove serverStartScript run parameter
Instead, create the resulting RunWorker as dependency directly.

Change-Id: Id15005bb5707bb97dfc61cc2f84409e759e60f9f
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 13:34:06 +00:00
hjk
7eec0f63ac Debugger: Merge DebuggerStartParameter into *RunParameters
The users (typically target specific DebuggerRunTool derived classes)
are meant to use the individual setter functions nowadays, not the set
up the full structure, so the members are a true implementation
detail now.

Change-Id: Ida04801e3230a2fe8bbadde8845e58c3077c87a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 14:00:59 +00:00
hjk
67b4a7a872 Debugger: Replace a few more uses of setRunParameters
Change-Id: I8f35bcd3812402cda7d3c69eb01ed3d3fb9e396a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 06:26:36 +00:00
hjk
001d4c10a7 Debugger: Remove use of setRunParameter() for state auto test
... which are disabled anyway.

Change-Id: Id15de0e5b766373570d89bacf02464e46f5b2b89
Reviewed-by: hjk <hjk@qt.io>
2017-09-12 15:34:23 +00:00
hjk
c26149dc43 Debugger: Integrate setupEngine() into tool start()
... a step towards abandoning the engine-related bits of
the debugger state machinery. The base RunWorker states
meant for that are good enough now.

Change-Id: I3b269bdeb66f14a956b76e6a7e8258f45b3e59e5
Reviewed-by: hjk <hjk@qt.io>
2017-09-12 14:36:22 +00:00
hjk
8e96bc9176 Debugger: Dissolve createEngine
It was a recursive wrapper taking too many arguments to handle
what is at most a two-stage linear process. Making that explicit
is shorter and clearer.

Change-Id: Ibcb3422ff29b36b2b4df174fcffa8af62c254701
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-12 11:53:22 +00:00
Jarek Kobus
b506fce0fe Fix string messages
Found during translating.

Change-Id: I9626b3393d7b53300f7c806acbc5e12bc58574d2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-11 08:29:41 +00:00
hjk
808f192ff8 Qnx: Dissolve a QnxDebugSupport setRunParameter() use
Change-Id: I54cacf6dbcb5f68a2f063e41a86fc6d0c33da900
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-11 07:58:28 +00:00
hjk
e44d16e3de Debugger: Remove convenience DebuggerRunTool constructors
Use setRunParameters() for now, and individual setters later.

Change-Id: If7d044ea249b79ce117897a976659e9302bfc544
Reviewed-by: hjk <hjk@qt.io>
2017-09-08 13:53:51 +00:00