Commit Graph

509 Commits

Author SHA1 Message Date
hjk
4977c91544 Debugger: Directly pass from engine to inferior setup in all engines
This removes the setupSlaveInferior() synchronization point which
wasn't really needed anymore as it was always triggered in
response to a notifyEngineSetupOk() of the master engine.

Change-Id: I24faec36b180fa961e10dfd88fe4d874f7310140
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-17 11:20:09 +00:00
hjk
cc7754920c Debugger: Simplify use of DebuggerEnginePrivate members
Each engine has now the RunTool pointer, not just the master.

Change-Id: I6bab026998d5da5da82224bfaf4a93d3cfb3a898
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-13 12:35:43 +00:00
hjk
ad4ec4eb3c Debugger: Remove DebuggerEngine::m_lastGoodState
The only use left was a not-so-important debug message.

Change-Id: I91bd1b744fb2f173037777461dd15e7720421ccc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-13 12:34:42 +00:00
hjk
abe755cfd8 Debugger: Simplify queue/do pairs
The functionality has been needed for asynchronous processing
which are in RunWorkers nowadays, where the functionality is
provided by the general RunControl framework.

Change-Id: Id18f693935cd6faf5b25883dfeaace0dd691f6a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-13 12:33: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
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
526e217ce9 Debugger: Centralize abort handling
... and apply even more force on the second trying by forcing
ramp down of the runControl itself instead of hoping that it
would pick up hints.

Change-Id: I9d0f4130cb9a137b91c9fa81c3d255f236f98be0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-21 12:46:13 +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
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
a512c8e0c8 Debugger: Centralize some parameter sanitization
Change-Id: I00e7c22adcf32ba8251b357e75eb9207b6f98f1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-06 09:57:27 +00:00
hjk
e16a30712e Debugger: Re-enable some shutdown cleanup code
It is still needed with LLDB.

Task-number: QTCREATORBUG-18723
Change-Id: If78dcbf8e074add969c403c37193c9f4ce857625
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2017-08-14 12:47:47 +00:00
Orgad Shaneh
9030e34dea Debugger: Fix crash when interrupting while waiting for locals
Change-Id: I9c8fbe14d238b2c2526598d4cbca561c7e9a5d0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-27 04:46:53 +00:00
hjk
528b0918bf ProjectExplorer: Remove RunControl::bringApplicationToForeground
... and replace it by direct uses of ProcessHandle::activate().

Change-Id: I7beffba7bfbeff72a81b8699ff54a311a74ce1a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-17 14:00:49 +00:00
Orgad Shaneh
a78fd02574 Debugger: Do no warn when debugging with MinGW
Change-Id: Iee9cc2232c002ea960f05848df02ac0658017911
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-10 08:22:18 +00:00
Orgad Shaneh
267b0431e2 Debugger: Fix typo
Change-Id: I1ef2db7ce7546118d68925708dc2c1573653417c
Reviewed-by: hjk <hjk@qt.io>
2017-07-10 07:23:52 +00:00
Orgad Shaneh
72775ab8c4 Debugger: Add missing state cases in quitDebugger
* Aborting a core dump debugging is a valid state
* Do not try to abort more than once (happens on shutdown)

Change-Id: I075409b3fa1231420fcd72706b18eaa0383fd4f2
Reviewed-by: hjk <hjk@qt.io>
2017-07-07 06:16:20 +00:00
David Schulz
7293c01210 Debugger: Fix inappropriate debugger warning when using mixed debugging
Change-Id: I3fb1818e36d01f69cca6ad07653afdc49bda702e
Reviewed-by: hjk <hjk@qt.io>
2017-06-23 05:25:54 +00:00
hjk
ffc97df7a6 Debugger: Remove remote setup sub-statemachinery
Not needed anymore in the world of RunWorkers.

Change-Id: Id7fb24fece6acb03de12f2677dd99a05c513e7a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-06-22 12:28:08 +00:00
hjk
c060571fcd BareMetal: Avoid use of otherwise unneeded requestRemoteSetup() signal
Note that this changes the startup timing in the StartupOnNetwork
case slightly, as the application launch is now triggered in
parallel with the gdb launch.

Change-Id: Iaa0b60b8c478eb47abb6e93fbd3b326e0acdd13b
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-19 10:43:19 +00:00
hjk
a55a376b1d Debugger: Fix crash on ramp down
Change-Id: I76aab19d92eae10823196a4c6dc9a2c400d47e80
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-19 09:24:49 +00:00
hjk
1d921ae044 Android: Convert into a RunWorker based setup
This moves all of the RunControl implementation into a single
RunWorker, not yet splitting it up into separate RunWorkers
which is the final goal of this series.

Change-Id: I7373105603505aa4fffd7fe5ff0145f0128b34bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-12 06:38:40 +00:00
David Schulz
118faf1180 Debugger: Fix warnings for inappropriate debuggers
Change-Id: If463c18d1d04cdd78b6be34e98b76c8df89594f2
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-30 05:35:25 +00:00
Orgad Shaneh
d84a6ed411 Debugger: Fix state transition warning
*** UNEXPECTED STATE TRANSITION:  "State changed from DebuggerFinished(22) to DebuggerFinished(22) [master]"

Change-Id: Iddacafbe337b95aa441aecbaf3ebf85c08a83d81
Reviewed-by: hjk <hjk@qt.io>
2017-05-29 06:22:29 +00:00
hjk
a37c8add58 Debugger: Fix QmlInspector state update connection
Change-Id: I1693d593ec08c14c48b2c2800ce2f240f9e5f438
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-19 13:07:01 +00:00
hjk
36ec37b29d Debugger: Streamline ramping down
There were only two used target states, and in case of mixed
debugging all parts of the machinery better agree on the
direction. So one bool in the (shared) runTool is sufficient.

Change-Id: Iffbf1651b82dde707cfc37d8da9d3da573b34b76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-19 09:56:49 +00:00
hjk
1f6764a54e Debugger: Move run parameters from engine to tool runner
The parameters belong to the run control, they should not
be triplicated in case of a combined engine.

Change-Id: I4dd84220edbd7a44b902cc52627fe01d0568db75
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-18 07:05:09 +00:00
hjk
89f02cba2c ProjectExplorer: Split Target and ToolRunners into smaller tasks
This increases re-usability of activities like 'port gathering',
and makes their use less dependent on actual device implementations.

Change-Id: I017cb74874f2b38c487ba2d03906a675d5618647
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-15 14:35:03 +00:00
hjk
2a46b1521d ProjectExplorer/Debugger/RL: Make run control state transitions more uniform
Forward all tool and target activities to run control, and initiate
further state transitions (only) from there. Also, make sure
tool/target's on finished() triggered on all finishing code paths.

After that, the base state handling is sufficient to handle remote linux
running and debugging.

Change-Id: I0150ef249c9ad0b7b8ac7192be6dc860c9ca8fc5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-05 11:17:49 +00:00
hjk
5d8d3fbdc7 ProjectExplorer: Extend centralized state handling
Add some customization hooks to make tools aware of target errors
and vice versa.

Change-Id: I4d815087297a3fa1d1d6d52daeed7c4ae0f624bf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-03 11:48:23 +00:00
hjk
5955901f93 Debugger: Compile fix after e213585910
'prepared' got renamed to 'reportPrepared' in the mean time.

Change-Id: I2426e8ab156df642525d42feeedcd3692c7c8ac8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-02 09:02:57 +00:00
hjk
e213585910 Debugger: Move part of engine startup to preparation phase
Change-Id: I414c356cd615096ee68588b839aaf975657fb7f9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-02 08:49:58 +00:00
hjk
c2ebce6849 Debugger: Reduce explicit DebuggerRunControl use
Aim is to replace it with its ProjectExplorer::RunControl base.

Change-Id: I30f837050e7c016887dc4b6cfef10b947f4f88ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-27 07:43:30 +00:00
hjk
07884645af Debugger et al: Move code from DebuggerRunControl to DebuggerRunTool
It's tool specific, so put it into the tool (only) related code.

The additional level of indirection will go again, plus the original
one will be removed once the *DebugSupport classes can directly
use DebuggerRunTool as base.

Change-Id: Ieaa386a0f7d724b09cedaaba8fb7d1e6dc4ad55b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-04-24 14:48:35 +00:00
hjk
384d141aac Debugger: Use a qobject_cast instead of some static_cast
The underlying assumption may be violated soon, make it
easier to debug if it breaks.

Change-Id: I7511d5677659e266f2d01db8bafb46bcd93d7f7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-21 11:59:41 +00:00
David Schulz
890e7546e4 Debugger: Merge prepareCommand
Change-Id: Idd316a88ae39d563c99d3b4081f88fc41e604499
Reviewed-by: hjk <hjk@qt.io>
2017-04-19 09:05:09 +00:00
Eike Ziller
88897f3a87 Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp
	src/plugins/genericprojectmanager/genericproject.h
	src/plugins/genericprojectmanager/genericprojectnodes.cpp
	src/plugins/genericprojectmanager/genericprojectnodes.h

Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
2017-04-19 09:56:14 +02:00
hjk
49b98f1149 Debugger: Make DebuggerRunTool (more) responsible for output
Make DebuggerRunTool accessible to downstream users, but remove
the non-standard handleApplicationOutput from the run control
itself to move it closer to the base run control.

LogChannel and Utils::OutputFormat should merge at some time.

Change-Id: I47b0f0067e1427b25e47036c3d4bc6ed5eed6189
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 13:13:11 +00:00
Wolfgang Bremer
60379856a4 Provide human readable debugger states
The debuggerengine has an internal state machine. This change provides
the state name instead of the states number for debugging purposes.

Change-Id: Ic8d63902e83e3905d7880a703302cb597174460b
Reviewed-by: hjk <hjk@qt.io>
2017-04-06 12:44:40 +00:00
hjk
716f6e7f1c ProjectExplorer: Make RunControl::bringApplicationToForeground virtual
No practical change as the only case that is used so far are local
setups on Mac. It's a conceptual change, though, giving concrete
RunControl implementation the chance to act "sensibly", e.g. by
raising a locally running simulator control in case of remote setups
or such.

Change-Id: I5679428934fe08b8c9756f3906ee3d9073278822
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-01 16:26:18 +00:00
hjk
329db5f4cc Debugger: Use ProcessHandle in notifyInferiorPid()
Change-Id: Idcb6819b64964b6aa0e72d182cc628feba37ba55
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-01 11:57:48 +00:00
hjk
32ae4d3e09 Debugger: Use Utils::ProcessHandle for DebuggerEngine::m_inferiorPid
That's the intended "typesafe" use.

Change-Id: Ib288fe87a47bd9484bda83e05406f0d22989b3c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-01 07:56:18 +00:00
hjk
7c29ae462b Debugger: Fix crash in combined debugging
Fixes regression introduced in f8ad72deb3: Slave engines don't
have a RunControl pointer of their own, use the master pointer.

Change-Id: I1c695a1454cafc3532fb1b79374fac4f3ead607e
Reviewed-by: hjk <hjk@qt.io>
2017-02-28 08:00:05 +00:00
Tobias Hunger
f8ad72deb3 Debugger: Report PID back to RunControl
Change-Id: I4830d2703de86c3fce8356271a2262c14c8f1307
Reviewed-by: hjk <hjk@qt.io>
2017-02-27 12:34:03 +00:00
hjk
66b19f334d Debugger: Provide a startup customization hook for 3rd party plugins
Change-Id: Ia587abcb1bdcdfbf192d3314610ec9addf370c9b
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-01-23 14:48:28 +00:00
hjk
3e8a1ea7ad ProjectExplorer: Move ProcessHandle to Utils for further re-use
Also, use qint64 instead of quint64, as this is what Qt uses.

Keep 0 for invalid PIDs, even if arguably -1 would be better,
but Qt uses 0, too.

Don't move 'toString', instead inline it into the only
caller, keeping translations intact.

Task-number: QTCREATORBUG-17596
Change-Id: Ie9411ea1d2031a5ab0a99bcb3ff48ee430afe254
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-17 11:19:12 +00:00
Eike Ziller
589fedf455 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/projectexplorer/kitinformation.cpp

Change-Id: I94299b069418586db97d1d596a252794e4037556
2016-12-20 17:14:19 +01:00
hjk
fc01d0ac46 Debugger: Use new shared result reporting infrastructure
Unify the watchPoint() interfaces, move the combined
implementation to the DebuggerEngine base.

Change-Id: Ic93aa760e7258197aed5eb7bfea257a40012cccf
Reviewed-by: hjk <hjk@qt.io>
2016-12-16 07:41:43 +00:00
hjk
26331f771a Debugger: Avoid messagesboxes on the same topic at the same time
Task-number: QTCREATORBUG-16971
Change-Id: I625f04cbd8f609c66597450dbad22ebc6eadcfe5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-14 14:10:14 +00:00
Orgad Shaneh
9c09ca9e42 Merge remote-tracking branch 'origin/4.2'
Change-Id: Ia98031eb87f1859c3736faa0cdd8b655e8a50689
2016-11-14 11:17:13 +02:00