Commit Graph

162 Commits

Author SHA1 Message Date
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
hjk
440f2ba028 Debugger: Dissolve a few more setRunParameter() cases
Change-Id: I92d7b75c9a9758ab8c2ad8f9956ebcd8ecc9cb69
Reviewed-by: hjk <hjk@qt.io>
2017-09-08 13:42:18 +00:00
hjk
49c14f5616 Debugger: Remove non-unneded DebuggerRunTool::setStartParameters
Change-Id: I5647f0c7232fbc12c66902a42c7a09f47cdef547
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-07 07:19:21 +00:00
hjk
5e871ddb65 Debugger: Dissolve createAndScheduleRun()
... into DebuggerRunTool creation and explicit RunParameter bulk setting,
which later is to be replaced by setting individual parameters.

Change-Id: Ic4d2c6d10d659287ae61fdb4db735e658e3a68ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-07 07:08:47 +00:00
hjk
898eb4a460 Debugger: Move .useTerminal modification to central fixup
Even if this is LLDB-specific having the value fixed early
will help in moving terminal handling into a RunWorker
of its own.

Change-Id: I73a9564148dec9b28557c12cc248a4f0b668f8d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-06 12:54:21 +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
706fb1a2b6 Debugger: Make setFixupNeeded() accessible to user code
Change-Id: I470b91e5ad80f2086f49c48d00975dd66444aa30
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-05 13:41:29 +00:00
hjk
0a5abdae59 iOS: Adapt to new setter-based DebuggerRunTool interface
Change-Id: I96f113b831dcbd3735f743c8f12042e9b17903a4
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-09-04 11:59:04 +00:00
hjk
82ce3c885f Debugger: Extend new setter based interface
Needed for WinRT and BareMetal

Change-Id: Iad8b4c36df6f004f74cb66dbf730b2ca43a0e413
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-25 11:00:43 +00:00
hjk
503a73d527 AutoTest: Use new setter based DebuggerRunTool interface
Change-Id: I559bef1b088af9009247542730208d18b514b118
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-25 05:50:16 +00:00
hjk
d34f33d8d7 Valgrind: Extend and use new DebuggerRunTool interface
Change-Id: I5e015a484e67175be12d538e7f814d61001ad7bb
Reviewed-by: hjk <hjk@qt.io>
2017-08-24 16:21:23 +00:00
hjk
ce62181cb8 Debugger: Add a few convience setters for some run parameters
The idea is to use them later to make the DebugRunTool setup leaner.
As proof of concept, use the new interface in LinuxDeviceDebugSupport.

Change-Id: I045ba4d05cfc56a9e875fd4461e9f562153872dd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-08-24 15:21:27 +00:00
Eike Ziller
ddd9e96afa Merge remote-tracking branch 'origin/4.4'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/libs/utils/utils-lib.pri
	src/plugins/clangcodemodel/clangbackendipcintegration.h
	src/shared/qbs

Change-Id: I240e89afc76d8f40ce69d66683014b603f714707
2017-08-23 12:12:41 +02:00
hjk
c128731ff2 Debugger: Use a QUrl for Qml server port and host
Host and port reasonably belong together, using a QUrl makes that more
explicit and follows the lead of the Qml profiler in that area.

Change-Id: I754cb17d165ce6b2f25c655eeebfd8ac8f5a93c7
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-08-23 09:13:40 +00:00
hjk
cfad538acf Debugger: Fix attaching via app output pane
Task-number: QTCREATORBUG-18604
Change-Id: Id41f3fe1bf08965cfdaf21a7059fc2f1db49ecc7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-23 08:18:21 +00:00
hjk
c0e417dcbf Debugger: Move the server start script handling to separate worker
It's currently only used via Debug->Start Debugging->Attach
(misnomer...) to running debug server, and only honored by GDB.

Moving it to a separate, centrally created worker makes makes it more
widely available and reduces the need for 'custom' handling in
the GdbRemoteServerEngine.

Change-Id: I39de7a5d8b64fc35d4bf93878e38c1866db90379
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-08-21 13:25:28 +00:00
hjk
885f8b5385 Debugger: Short-circuit part of the parameter fixup machinery
... which should not exist to start with, and interferes in some
cases where the user code knows better.

Change-Id: Ie0b0038af3a4056fad8655d06f677fc800c99f8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-08-14 16:03:25 +00:00
hjk
c839e86863 ProjectExplorer: Introduce RunWorker::reportDone()
To be used for short-lived tasks to signal that they are done.
Essentially an optional reportStarted() followed by reportStopped()

Using it in GdbServerPortsGatherer when the port list is ready fixes
the wrong "un-stopped" situation in RemoteLinux debugging when
the inferior finishes by itself.

Change-Id: I310831a7875fe6f2c598302b73cda6c9669efb1d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-08-09 14:12:45 +00:00
Orgad Shaneh
e2e109c862 Debugger: Work around race when running from command line
If the project was not parsed yet while the debugger is invoked,
activeRunConfiguration is still null, so the debugger doesn't start.

Task-number: QTCREATORBUG-18551
Change-Id: I02d77fa8fb1b2a3673da5cbf28ea36156498918c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-08-01 11:33:37 +00:00
Leena Miettinen
6fccc45a92 Debugger: Fix UI text to follow the guidelines
Change-Id: I7afa680c15f9dacfa8b0a17c16c442211d4fc7ce
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-08-01 11:15:04 +00:00
Orgad Shaneh
e9aaeb22f8 Refine the creation of a dummy project for the debugger
If the startup project doesn't support the chosen kit, it fails.

Task-number: QTCREATORBUG-18606
Change-Id: I745768e7e9ee1740dadaae05d02dcc45f9e9ebef
Reviewed-by: hjk <hjk@qt.io>
2017-07-20 09:57:06 +00:00
Orgad Shaneh
023edafe4c Debugger: Fix copy-and-pasto in qmlDebugging
Change-Id: I89af5e4cc555457d4b55cd94049175618dc059d8
Reviewed-by: hjk <hjk@qt.io>
2017-07-14 06:19:26 +00:00
Orgad Shaneh
b710f79bef Debugger: Reduce one call to runnable()
Change-Id: I8e0ce18fa65a3281fcadf9b5a8ffb4008a0cf294
Reviewed-by: hjk <hjk@qt.io>
2017-07-14 06:19:09 +00:00
hjk
9e67a9453a Debugger: Use a somewhat less intrusive hack for 'start at main'
Change-Id: Ie649a4a11c88f3686cd6ed1e73f34c7c78fd0e13
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-12 09:45:28 +00:00
hjk
e9718b253a Debugger: Partially dissolve DebuggerRunControlFactory
Aspect creation must stay for now as the object pool is the only
central registry for it right now.

Change-Id: Ibe42009db6b0351aaa36e9ac8f0f6f7a0562167e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-11 11:10:44 +00:00
hjk
6f0a600bcf Debugger: Streamline error string handling
Let the workers keep track of errors instead of passing around
string pointers in some but not all interesting places.

Change-Id: I3956bc947a50747dd3a0c9302b9f9873d192e9c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-11 10:53:00 +00:00
hjk
acc86aee5a ProjectExplorer: Move re-runnable decision to RunWorkers
A RunControl is re-runnable if all its workers are,
a RunWorker is re-runnable if it's Stopped and unless it
says otherwise.

Also ensure SimpleTargetRunner only reportStop() once
per run and make process error message re-usable.

Change-Id: I73f5fb724d3026ceb81d5e32a3a71b4814b2bca9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-10 09:02:17 +00:00
Orgad Shaneh
af98652215 Debugger: Fix core dump with project from command-line
Change-Id: I223dc3c00aa7d4b2cda743a9292272387177ed93
Reviewed-by: hjk <hjk@qt.io>
2017-07-10 07:36:25 +00:00
hjk
eb0aa0b76f Debugger: Connect GdbServerPortsGatherer signals in constructor
Not in start(), when it would add extra connections on each re-run.

Change-Id: I5fe9e047a188276f3bde54227dc0509ab77366c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-07 14:55:27 +00:00
hjk
8f1f333004 Debugger: Use a SimpleTargetLaucher for gdbserver
Makes remote output appear again in the Application Output pane,
and is arguably the right thing to do anyway.

Change-Id: I05c365eec43f60a85482b8ae7d5856b3a31ee6f8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-07 14:36:39 +00:00
hjk
8376afd9d7 ProjectExplorer: Remove RunControl::worker<Type>()
It looks like the case where workers need talk to each other by
only knowing the type of the 'partner' does not exist in practice
anymore. With the now-common setup of a 'primary' worker that one
can introduce the 'lesser' workers to each other directly.

That's also conceptually more robust that picking a partner by
type only only from some 'pool' (all the workers in a runcontrol),
scales better (it e.g. is imaginable that a RunControl needs
more than one PortGatherer in complex setups where more than one
device is involved) saves a few cycles, and even removes the need
for workers to be qobject_cast-able.

Change-Id: Ib3d8c942c893d6c198d9813cce7df28ba3260ce8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-07-07 10:56:25 +00:00
hjk
3610b2a825 Valgrind: Fix Memcheck startup on remote linux
Remote CallGrind is still dysfunctional.

Change-Id: Ib9ab537dc068c94c7e61ac48b1a4b9d655ccb60f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-28 15:39:21 +00:00
hjk
3a45d763ca Debugger: Remove DebuggerStartParameters::connParams
It's nowadays a duplicate of a subset of what DSP::remoteChannel
provides.

Change-Id: I95363bd392cb1d24fb1f1e0a2780c2c295929cea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-23 13:09:04 +00:00
hjk
e797f41759 RemoteLinux: Prepare for downstream Qdb adaptations
Change-Id: Ie00eb97cd0aeaf8eac193ead3048c180fe39808e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-23 12:43:09 +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
f99352df5c Debugger: Add a display name to GdbServerPortsGatherer
For debugging reasons.

Change-Id: I8136bbfb9a6558ab89f775e8e1410081cda3f95d
Reviewed-by: hjk <hjk@qt.io>
2017-06-15 07:47:13 +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
Robert Loehning
ceb9533f75 Debugger: Clean out fixupParameters
Change-Id: I01b1308f4d438b7e0cb4ae643b79abd285ea9db7
Reviewed-by: hjk <hjk@qt.io>
2017-06-01 14:27:59 +00:00
Robert Loehning
ae80651163 Debugger: Don't try to find two processes with same PID
Change-Id: I88500973f698db55b10528a61cf38de6ef248949
Reviewed-by: hjk <hjk@qt.io>
2017-06-01 14:26:49 +00:00
hjk
406ddaa36c Debugger: Remove DebuggerRunParameters::device member
The device is always available via runTool().

Change-Id: I4a2a791a5a75b32803c06fc34947b82b869fe31c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 13:49:17 +00:00
hjk
74a96bd0a6 ProjectExplorer: Fix debugger shut down
Change-Id: Ic74470aedc6d5b9d70858e21a73df1bcdb48ac49
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-29 07:17:00 +00:00
hjk
a7ad7f1766 WinRt: Port to RunWorkers
Keeping it as one blob for now, a proper split in the new architecture
would make WinRtRunnerHelper a RunWorker, too.

Change-Id: Ie310d05c1edf0ef9544b80743c140e44fcffc3ae
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-19 11:35:38 +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