Commit Graph

526 Commits

Author SHA1 Message Date
Eike Ziller
45f8d221bf Use FileName in TextMark
Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-03 06:51:47 +00:00
hjk
7c41720479 Debugger: Allow disabling individual breakpoint locations
... for breakpoints that resolve to multiple locations, like templates.

Toggling is done via the the breakpoint view context menu, for now
only available with GDB and not persistent.

Change-Id: I098ae13a5518e9f671c647680f8bd4413e7e5ccc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-01 10:20:33 +00:00
Oswald Buddenhagen
777ca8e655 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp

Change-Id: I94647f59d7a9df48168ac066555afe80f5f9b91f
2017-12-21 13:20:24 +01:00
David Schulz
a5ceca3a8d Debugger: fix state handling when aborting debugger
Change-Id: Ied4fcf7d39bf8ca96714fc3fbbdb7edd88f1048b
Reviewed-by: hjk <hjk@qt.io>
2017-12-18 12:16:35 +00:00
hjk
d47fdb934d Debugger: Change semantics of DebuggerEngine::masterEngine()
Make it return 'this' if 'this' is the master engine itself.
Adapt users.

Also do not let the QmlEngine try to beginConnection() when
the combined engine was isDying() already.

Change-Id: I308deae14a3c4966be381f321c0d9dfaf82c40d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-12-15 11:50:01 +00:00
hjk
c21657184b Debugger: Move master engine checks around
From several places in DebuggerEngine::* to one place in
DebuggerEnginePrivate.

Change-Id: Ic87110a11087e338cc9a6b66ea30ea2259861d9e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-14 13:38:16 +00:00
hjk
b6697e7932 Debugger: Remove an unused function declaration
Change-Id: Ic936953eeeeeab82a73c11fbe80361326acff055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-14 13:38:00 +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
hjk
3888e9c817 Debugger: Fix some state transition warnings
Effective functionality is unchanged, this only avoids warnings
about InferiorSetupRequested -> InferiorSetupRequested transitions
in the slave engine.

Change-Id: I727a271e105df69d18232854a7828960f40c0574
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-08 08:51:15 +00:00
hjk
83ff62aa13 Debugger: Synchronize slave engine inferior setup phases again
This reverts most of 4977c915 and applies the same pattern for
setupEngine. Turns out that the removal was premature due
to the special needs of Android setup.

Task-number: QTCREATORBUG-19199
Change-Id: I4e2ff4f34a842f3296999a0651e7e8fd6470198c
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-07 13:42:59 +00:00
Christian Stenger
a1b486011a Debugger: Fix placing of finished message
This message had been displayed on the Application Output pane before.
Restore this behavior which broke with 597488be.

Change-Id: I29dcae877f2f19bce05e0ec1f32274b1e7cca25f
Reviewed-by: hjk <hjk@qt.io>
2017-10-23 04:37:01 +00:00
hjk
9dadffd997 Debugger: Move disassembler style connection closer to its only use
Change-Id: I1ed462d41663e15cd05ee0d65b2080bfba179de7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-20 09:24:05 +00:00
hjk
959c13e298 Debugger: Remove some old debug code
I doubt this has been used in the last five years.

Change-Id: Ia81cacfead1d15f77cb7e1e438ebcd59a238af70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-20 06:23:31 +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
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
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