Commit Graph

554 Commits

Author SHA1 Message Date
Christian Stenger
efc851e01e Debugger: Hide 'Registers' by default
Registers had been not visible before 4.8 except the user
explicitly enables it.

Change-Id: Ie515a59b40a7f3cd3b9e62eca2707d8a76ab4ab1
Reviewed-by: hjk <hjk@qt.io>
2018-10-05 09:10:36 +00:00
BogDan Vatra
25264d9bd9 Fix debugging on Android arm64/x86_64
On Android 64, there is no lib/ symlink anymore, so we need to upload
gdbserver from QtCreator.

Change-Id: Ib6f6d9b623dc61b72dd434ce1b3b409e880bdeaa
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-10-04 15:36:35 +00:00
hjk
92325c90ce Debugger: Rename snapshothandler.{cpp,h} to enginemanager.{cpp,h}
That's what they are nowadays.

Change-Id: I1bd6db18f2142ecf488eba51ca739675eac753c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-28 07:38:55 +00:00
Christian Stenger
d38064892b Debugger: Ensure status message is printed
Activate the debugger engine before the status label is updated
to avoid purging the status label content.

Change-Id: I060cdaaf3d09e3636fbe206f65941ec56abb5eb7
Reviewed-by: hjk <hjk@qt.io>
2018-09-24 09:59:05 +00:00
Orgad Shaneh
d9275913d3 Debugger: Fix crash when starting with expressions
Task-number: QTCREATORBUG-21087
Change-Id: I9d98bb045504d91964f4dd33ad042adba6a128ba
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-09-17 13:40:09 +00:00
hjk
375791ec58 Debugger: Re-organize registration of sub-perspective switcher
Change-Id: Ia3559e5c4793bb297c9bdfbdf32a56d285ee0700
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-11 11:18:09 +00:00
hjk
bdc1ea1d74 Debugger: Do not remember persistent layout settings per engine
Fixes: QTCREATORBUG-21006
Change-Id: Id3c2062eb5b42808d666f0fc3620a82666fe14a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-11 08:48:31 +00:00
hjk
86cd29b13c Debugger: Simplify thread switching more
This moves the thread switcher combobox, the only consumer
of part of the threadhandler interface, into the threadhandler.

Change-Id: Icafd72e7777fad9196ce8fb33a79cae26c29a521
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-03 11:37:17 +00:00
hjk
62fba85057 Debugger: Fix switching threads using the threadsview
Amends 9f9c7230.

Change-Id: I58193f2d159bb6b839762b0cf02ec8fc4a9df48a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-31 13:06:10 +00:00
hjk
a6719ed0ff Debugger: Remove thread handler location reset handling
Has not been needed since Utils::TreeModel was used.

Change-Id: Iff60a631e306e9756f83d70eacf19c2fe49bcedd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-30 13:31:24 +00:00
hjk
893146b8b6 Debugger: Split ToolTipManager into per-engine parts
Change-Id: If2e601a91ad2a0e5ba30916a5d1f2312ecff944f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-28 14:14:21 +00:00
Ulf Hermann
33a0ab8943 FileInProjectFinder/Debugger: Use FileNameList for search directories
Change-Id: I8f9fa4631fda26e10e6b21abfcba9e5f74d635c2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-27 08:59:11 +00:00
Ulf Hermann
9bbef89cdc FileInProjectFinder/Debugger: Use Utils::FileName for project directory
Change-Id: I5a3f376bea4ee06c6856e614f6f71974c2f5ca87
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-27 08:58:14 +00:00
Christian Stenger
c03e5aebe0 Debugger: Fix typo
Change-Id: I16be2a69d0050e27b908bff4991dfb11e9dfd25e
Reviewed-by: hjk <hjk@qt.io>
2018-08-23 14:57:43 +00:00
hjk
4b7a9ae5db Debugger: Replace Internal::mainWindow
... by DebuggerMainWindow::instance() and clean up a few uses.

Change-Id: I7ae4073aa97fc2f00108533bed91db330b07880f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-23 13:55:56 +00:00
hjk
0303b84fff Debugger: Fix switch from and to sub-perspectives
Change-Id: I17d3b7eb6416843b7a330da14528f0670cd88452
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-23 12:17:39 +00:00
hjk
32d2a4c985 Shift perspective ownership to plugins
Change-Id: Id146ca771b4dc92f35cf156efbabae154f2d940f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-21 15:38:22 +00:00
hjk
9f9c72302f Debugger: Streamline ThreadHandler
- Use the TreeItem/data pattern recently introduced with Breakpoints
  to remove the need of keeping track of id/object mapping. Opens
  possibility to have thread groups as intermediate level.
- Use the ThreadHandler directly as model for the thread combobox
  to remove the need of manual combo box updates.
- Move setting current thread from individual engines to central code.

Change-Id: I030e21a4aa5ab30b0efbc84528d9cecf29cbbe30
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-21 07:25:57 +00:00
hjk
3b5ecac238 Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.

The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.

Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.

Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.

The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.

There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.

The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.

There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.

Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-08-17 12:35:15 +00:00
David Schulz
99e3635ef3 Debugger: remove redundant info whether to use cpp debugging
Task-number: QTCREATORBUG-20168
Change-Id: I2a0bfba6aea39da443032fd9ab02869cdc508696
Reviewed-by: hjk <hjk@qt.io>
2018-07-26 06:40:33 +00:00
Alessandro Portale
0558db7b54 Debugger: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-25 12:52:43 +00:00
hjk
00c926b6b4 Debugger: Remove unused DebuggerEngine::isSynchronous
Change-Id: Ia1eb3a65fabbf966a1766d68456144fd9e093ae8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-24 12:10:20 +00:00
Eike Ziller
5c81a65422 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I29916313f12e25f3942ac926f8e4d4490074978e
2018-07-05 11:14:33 +02:00
Christian Stenger
63034e55ce Debugger: Fix state of instruction wise operation button
Task-number: QTCREATORBUG-20714
Change-Id: Ie45fcb288a5e6a566a38b35d375b703c9c5a2326
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-07-04 05:52:46 +00:00
Ulf Hermann
b9328012b1 Debugger: Do not switch to design mode when hitting a break point
Change-Id: I2b31aa78a707ca830382095f20d33439caa830ac
Task-number: QTCREATORBUG-20712
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-03 07:17:32 +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
hjk
c4e3cda26a Android: Remove traces of special debugger setup
Change-Id: Ibf85a6e6e7c025287dd388bc5908cefc30fbaa2f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-08 09:56:09 +00:00
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