Commit Graph

578 Commits

Author SHA1 Message Date
Eike Ziller
2529b36b40 Merge remote-tracking branch 'origin/4.8'
Change-Id: Id1484d611d457d8e4598fb53975b2288690b64bb
2018-12-17 10:05:11 +01:00
hjk
2c395df349 Debugger: Use toolbar stop icon in toolbar
Fixes: QTCREATORBUG-21720
Change-Id: I6929278cc9610a1cf0a1655875e837c738853185
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-12-14 08:09:48 +00:00
Eike Ziller
9084ca73df Merge remote-tracking branch 'origin/4.8'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I87f47cecbb924064296a002fd9446a0627acad8e
2018-12-12 09:44:13 +01:00
Aaron Barany
867befc5ae Debugger: Fix switching to previous mode on exit
This behavior was broken with refactoring done in commit
3b5ecac238. This has two main components:
1. Perspective::select() needs to call EngineManager::activateDebugMode()
   in order to save the previous mode.
2. The contents of the previous function
   DebuggerPluginPrivate::activatePreviousMode() was placed in
   EngineManager::deactivateDebugMode() and is called in
   doFinishDebugger().

Task-number: QTCREATORBUG-21415
Change-Id: Ibca188ba740027769c497e25ea695af8e218ea4e
Reviewed-by: hjk <hjk@qt.io>
2018-12-10 18:42:14 +00:00
David Schulz
57715c7f66 Debugger: do not show warning on remote debugging session
Do not show a warning about debugging a release build when attaching to
a remote cdb debug session.

Change-Id: Icfafe13efc873cafc98466d3ab2cd2c344796e0e
Reviewed-by: hjk <hjk@qt.io>
2018-12-07 12:59:39 +00:00
Eike Ziller
3d1d9aae2e Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/winrt/winrtdevicefactory.cpp

Change-Id: I33b8697e2ebf2bea051d7f1144449e0743ee16a5
2018-11-19 10:00:18 +01:00
Robert Loehning
efe30bc5a5 Debugger: Fix translation contexts
Change-Id: Id41ba15a4f0f5956148661e3c329cbb36a373f48
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-14 13:21:17 +00:00
hjk
18e73a738b Debugger: Fix display of location marker when switching perspectives
Fixes: QTCREATORBUG-21362
Change-Id: I9bc1f0931ea902d04ab256774347b63c1fc64262
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-14 13:08:54 +00:00
hjk
0ee07ae2ad Debugger: Make validateExecutable a validateRunParameters
Gets rid of the odd and otherwise unused
DebuggerEngine::mutableRunParameters() function.

Change-Id: Ib0861432e7c61072db2968acf2f36c7f2d56c89a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-11-13 09:18:29 +00:00
hjk
6a043d32dc Debugger: Fix handling of some actions after multiinferior split
The pattern used is some inactive/invible global action with a
command to put in the menus, and per-engine action "overloads"
to reflect the active engine's state once there is an engine.

Task-number: QTCREATORBUG-21454
Change-Id: I861a42994849ef9f0b51fb7b1608f14fa7fa9d7c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-13 07:16:37 +00:00
Eike Ziller
3666e3aaeb Merge remote-tracking branch 'origin/4.8'
Conflicts:
	tests/unit/unittest/unittest.pro

Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593
2018-11-09 13:30:40 +01:00
Orgad Shaneh
70b466b7d9 Debugger: Split expressions and locals and anchor Registers to Locals
The Locals view is the first tab, and the Expressions view is not visible
at all. If you grab a variable to the Locals view, it just "disappears",
and you need to know where to look in order to find it.

Return to the previous layout, when Expressions and Locals were both
visible in the same view.

Change-Id: I775fe88beb921c61c048ba7106d05ae08b8fe026
Reviewed-by: hjk <hjk@qt.io>
2018-11-07 14:52:15 +00:00
Eike Ziller
1473bc5891 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggermainwindow.cpp
	src/plugins/qbsprojectmanager/qbsbuildstep.cpp
	src/plugins/winrt/winrtdevicefactory.cpp
	tests/unit/unittest/gtest-creator-printing.cpp
	tests/unit/unittest/gtest-creator-printing.h
	tests/unit/unittest/unittest.pro

Change-Id: Ie9b80b87a8a4fa81baf72a2daa7919b21371c15e
2018-11-06 09:20:00 +01:00
Eike Ziller
1c17ed6db8 Debugger: Use engine specific contexts for delegating actions
Some actions that are engine specific are visible globally in the Debug
menu, like stopping, interrupting and continuing the debugger, and
various step variants.
These are registered in the action manager by the debugger plugin.

Avoid duplicating the state management of these actions in the debugger
plugin, by registering these actions as disabled dummies.
The actual actions of the specific debugger run are now registered in
the action manager by the debugger engine instance, for a debugger
engine instance specific context.
The engine manager sets the engine instance specific context when the UI
is switched to the specific debugger run.

Change-Id: I0a311cec0856365b830460dec2ce33d14a2289c0
Reviewed-by: hjk <hjk@qt.io>
2018-10-25 12:58:25 +00:00
Eike Ziller
3592106cc5 Debugger engine: Remove unused QActions
The debugger engine had actions for starting an engine, that were
created but never actually used.

Change-Id: Iaae534587514d98611c53dc649ddb537ed7f7053
Reviewed-by: hjk <hjk@qt.io>
2018-10-25 07:04:04 +00:00
Eike Ziller
fd7cba88ef Merge remote-tracking branch 'origin/4.8'
Conflicts:
	doc/src/editors/creator-only/creator-code-pasting.qdoc
	src/plugins/android/androidbuildapkwidget.cpp

Change-Id: Iea8b7135643d14ffe49d10b14bedb8fa5ac48063
2018-10-24 13:58:45 +02:00
Robert Loehning
d3cc6db57b Debugger: Move HTML out of translated string
Change-Id: If62850c782feb73ed469f6aa6e57ad2bc34006bc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-23 09:54:18 +00:00
Robert Loehning
a8d7142873 Debugger: Remove redundant dot
Change-Id: If9a3ac99ce50e269228d469a4b361f0c273ce703
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-22 14:26:32 +00:00
Eike Ziller
95db30bd3a Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggeritem.cpp
	tests/unit/unittest/unittest.pro

Change-Id: Id2e4e9c2bc87b2556d7c2845aea3fe2fa11b630b
2018-10-22 09:53:54 +02:00
Leena Miettinen
005d0353d5 Debugger: Fix UI text
Change-Id: Ib247a2accb592cefdbab0fe7495d6eae1cb0dba8
Reviewed-by: hjk <hjk@qt.io>
2018-10-19 13:06:41 +00:00
hjk
32b4dbbd84 Debugger: Use actions in different contexts
... for F10-as-in-Start-and-break-at-main and F10-as-in-step-over.

Change-Id: Ie8e9e9be389a09a1485cadeea8b2d035a130920a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-17 10:50:23 +00:00
hjk
fa96f73192 Debugger: Rework step{In,Out,Over} handling
Main menu action pass operation to current engine, everything else
is handled there.

Combine execute{Step,Next} and execute{Step,Next}I functions.
Implementation were mostly similar, in some cases unneeded
(the instruction-wise version e.g. for Python)

Drop GDB-isms 'step', 'next' in favor of 'step in' and 'step over'.

Change-Id: I232232bc7a67d9d297a74f1c81dc43be96787d34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-16 10:34:31 +00:00
Orgad Shaneh
147a3c27c4 Debugger: Strip QLatin1* where possible
Change-Id: Idcab23875b5dc2ecf55e3303f417b995e2252720
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:32:31 +00:00
hjk
36b654567d Debugger: Finalize moving Operate by Instruction to engines
Fixes: QTCREATORBUG-21211
Fixes: QTCREATORBUG-21212
Change-Id: I6c0259052336f2141462157c319abeaec9a1e483
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-10-05 12:54:44 +00:00
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