Commit Graph

1227 Commits

Author SHA1 Message Date
Eike Ziller
d09b71d260 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/android/androiddebugsupport.cpp

Change-Id: I01c4880850ad25432a65bb32849365d2aeb0756f
2018-07-10 07:44:53 +02:00
hjk
cb572773c0 Debugger: Robustify MainWindow state saving
Save the state before child widgets are affected.

Task-number: QTCREATORBUG-20721
Change-Id: I1d0d1ca610b0a8e8904585953ecbb42dddee4827
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-06 13:42:05 +00:00
Tobias Hunger
4ceed778f8 Abi: Clean up constructors
Only have one constructor. Get rid of implicit conversion from QString
to Abi -- that seems rather non-obvious. Use Abi::fromString(...) instead.

Change-Id: Ic638d3d4022c465123449089b0679197a5eb445d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-15 12:12:01 +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
Eike Ziller
c8c6b28e22 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h

Change-Id: I192b9e88f967182f3275b4b98abed1220c26daac
2018-05-28 16:10:23 +02:00
hjk
89049b6fa2 Debugger: Remove some dead code
Commented out in the analyzer base merge, and never missed since then.

Change-Id: I078b12a70970dc244bc4590520bdb1dd80d8b2ff
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 07:37:02 +00:00
hjk
94d41afade Debugger: Move cpp snapshot storage to cdbengine
It's the only one using it.

Change-Id: I95dc4918c82653710a47cb8d0043bb3241e954ac
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-28 07:36:32 +00:00
hjk
db1174b6b8 Debugger: Remove a parameter with fixed value
Internal::displayDebugger's updateEngine parameter was always true.

Change-Id: I27e91b7327ef7f4ccfb7718ad47fe5316660ea17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 06:52:43 +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
Eike Ziller
2278ebed1e Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp

Change-Id: I873a2fa112321225e7b478739fc017b01d24ce18
2018-05-14 09:44:43 +02:00
hjk
3cfc715d7d Debugger: Try harder to find a usable device
In remote setups without proper run configuration (e.g. attach
using the menu) there was no device available. In some situation
there's access to a kit, though, containing the right device.
Use it.

Task-number: QTCREATORBUG-20331
Change-Id: I54523f71fc10c9959901f36f3d62872d139279e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-11 07:56:33 +00:00
Christian Stenger
88ecdaaf00 Debugger: Ensure debugger console is created
Output panes must be created before handling the settings
which of the panes to display.

Change-Id: I0c391f4c56c517d5a9626735006d741f64cf161f
Reviewed-by: hjk <hjk@qt.io>
2018-04-05 08:13:01 +00:00
Eike Ziller
0b10ecc718 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/ios/iosrunfactories.cpp
	src/plugins/nim/project/nimproject.h
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprojectmanager/qmlproject.h
	src/plugins/qnx/qnxrunconfigurationfactory.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/winrt/winrtrunfactories.cpp

Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
2018-03-13 11:25:38 +01:00
hjk
37ef24114c Debugger: Move DebugInfoTask handling to plugin
This does not involve the engine (currently).

Task-number: QTCREATORBUG-19994
Change-Id: I07a628580bf99c988eb0df165d649d5cc0869c0d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-08 16:59:10 +00:00
hjk
8c2bac9359 Debugger: Do not create the console unnecessarily
Triggering console creation in the plugin destructor is not needed.

Change-Id: Ic21016e7a19fa08ea7dd03a8364aa6fc229bb2d1
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-28 13:56:21 +00:00
hjk
6b7db0bae8 Debugger: Remove use of addAutoReleasedObject
Change-Id: I9a435448e05f56521eaca7f6ba2ac7780950fa18
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-21 08:21:14 +00:00
David Schulz
0eb7bab20c Core: make useMacShortcut constexpr
Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-02 13:15:55 +00:00
hjk
1b87d19a64 Debugger: Modernize
Mostly nullptr instead of 0, but also a few bits of collateral damage.

Change-Id: I921991272aca921dcdecf302dfff3716e79dfc24
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-01 10:28:54 +00:00
hjk
ae28c1bd67 Debugger: Avoid using addAutoReleasedObject
Not needed anymore for normal operation.

Change-Id: I9e167d28bb45afd8f98d8b0fed6fce183fea32ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-01 09:59:15 +00:00
hjk
a728b790ad Debugger: Allow breakpoint items to be collapsed
Change-Id: Ia525e0c0259d6ea9578734c6ce12ed4178685ddf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-31 14:53:30 +00:00
hjk
2052d6fc03 Debugger: Remove use of IPlugin::{add,remove}Object
The functions are about to be removed.

After cf7f898 the mode does not have to be in the global
pool at all, the plugin needs to stay there as it is used
for soft dependencies, but use direct insert/removal now.

Change-Id: I6497c3ea9fb68fdfa488e8c8700e31d91e36858f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-29 06:57:45 +00:00
Orgad Shaneh
22b0d3b6aa Debugger: Search for kit also by display name
The Id is not visible to users. Allow to pass name instead (first match
will be used).

Change-Id: I6bcd7ce50297e373b5b4d8a553009a27ff43cd24
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-01-22 14:29:03 +00:00
Christian Stenger
a26fecf851 Debugger: Only raise watchers window if debugger is running
Otherwise you run into a soft assert if you load a session that
had watchers.

Change-Id: Ib3566e7a8b26d953a904d6eeee536348afba9d62
Reviewed-by: hjk <hjk@qt.io>
2018-01-17 05:54:05 +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
hjk
83c13ff191 Debugger: Combine the InferiorShutdown{Ok,Failed} states
... into a InferiorShutdownFinished.

Change-Id: Icb5394f38f52f7cf300dc83f4eb8f2f0777bbcba
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-14 11:26:52 +00:00
hjk
585b2c62d5 Debugger: Combine the EngineShutdown{Ok,Failed} states
... into a EngineShutdownFinished. They were never handled differently,
and the only option is to proceed to DebuggerFinished anyway. So
simplify the state machine a bit.

Change-Id: Ied3be86fff6750abca578dc6788e4be1d895692b
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-14 09:42:44 +00:00
hjk
8f1a161c64 Debugger: Merge EngineSetup and InferiorSetup start phases
It was needed in the past to trigger e.g. gdbserver setup in
remote cases which is nowadays handled by separate RunWorkers.

Change-Id: I30bce071dab0779cce2e7abef7b31550d8539461
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-06 13:30:04 +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
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
hjk
78513ecd8f Debugger: Split Expressions view into dock of its own
Change-Id: Ie86a5bd72c3140219f925835a065d9f6a3ae0ea4
Task-number: QTCREATORBUG-19167
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-06 11:53:57 +00:00
Eike Ziller
7f626b1182 Merge remote-tracking branch 'origin/4.5'
Change-Id: Iceaa4ca40b5318744bde8a76c6d3ccca08df71bb
2017-10-25 16:07:21 +02: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
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
hjk
87cd4495a9 Debugger: Pass interrupt request more directly to engines
De-virtualize requestInterruptInferior() and let always
the master engine react to the request. interruptInferior()
diverts to the active slave in case of the combined engine.

Change-Id: I5d62cf9379c8a452132827897a9ac51e4027f595
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-17 13:57:34 +00:00
Orgad Shaneh
7a04014f9f Merge remote-tracking branch 'origin/4.5'
Change-Id: I2d78020f10aa66fdded63883030313e0c411ce02
2017-10-15 00:23:08 +03:00
Filipe Azevedo
e1ff09f332 Fix memory leak
This is not really a leak because they are owned by the main window.
But they accumulate in memory for nothing.

Change-Id: I521f3c9e3e535cd22ae27c974257866d1d6403b7
Reviewed-by: hjk <hjk@qt.io>
2017-10-13 16:43:35 +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
Orgad Shaneh
674b4296db Debugger: Always set executable from user arguments
It is required also for coredump, attch to remote etc.

Change-Id: I99bdcf860fc7c4ffd7918213a121b56977bec19d
Reviewed-by: hjk <hjk@qt.io>
2017-10-04 14:04:07 +00:00
Tobias Hunger
c330cf0679 Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-04 09:35:06 +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
Orgad Shaneh
91dd6ee0f9 Debugger: Fix crash when shutting down during core initialization
GDB output is still processed, but the docks are already deleted.

Use asynchronous shutdown, and wait for engine termination before deleting
the main window.

Change-Id: I28a36de15a0e9ce08ae18412d97aaf13cb0c25a6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-25 17:57:19 +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