Commit Graph

588 Commits

Author SHA1 Message Date
hjk
1396c6e8e9 ProjectExplorer: Use Utils::FileName for Runnable::executable
Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-21 10:32:31 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Orgad Shaneh
39ba01da71 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7d1912cd5c4d824fd40d3454c5f1bb796f2c21d8
2019-04-07 23:13:17 +03:00
hjk
5273ef2a8a Debugger: Re-organize dock widget persisting
Looks like the mainwindow cannot be convinced to handle multiple
sets of dockwidgets.

So switch back to a single set containing everything and keep
track of non-default visibility in the perspectives, and persist
these sets.

The following pass:

1.

 Start Creator with new settings
 Goto Debug Mode
 Move Break dock widget to right, switch on Global log widget
 Leave Creator
 Start Creator
 Goto Debug Mode
 Check: Debugger Selected, Break on right, Global log visible

2.

 Start Creator with new settings
 Goto Debug Mode
 Move Break dock widget to right, switch on Global log widget
 Switch to QmlProfiler sub-perspective
 Leave Creator
 Start Creator
 Goto Debug Mode
 Check QmlProfiler selected
 Switch to Debugger sub-perspective
 Check: Debugger Selected, Break on right, Global log visible

3.

 Start Creator with new settings
 Use any C++ test project
 Start debugging / stop at main()  (F10)
 Wait for stop
 Switch to Edit mode
 Switch back to Debug mode
 Check: Only "running" debugger dock widget layout present
  (not the normal + preset at the same time)
 Quit Qt Creator while this debugger is running
 Check: Shuts down without crash

4.
 Use any C++ test project
 Start debugging
 Switch to Debugger Preset perspective
 Start a second debugger
 Kill either instance
 Check: Application dies, Debugger Preset perspective gets displayed
 Switch to perspective of second instance
 Check: Perspective looks ok (docks visible as before)

Task-number: QTCREATORBUG-21083
Task-number: QTCREATORBUG-21669
Task-number: QTCREATORBUG-21668
Task-number: QTCREATORBUG-21813
Task-number: QTCREATORBUG-21851
Task-number: QTCREATORBUG-22110
Task-number: QTCREATORBUG-22169
Task-number: QTCREATORBUG-22189
Change-Id: Ic9eb41ff7699ac0f48a85e68376daa80b2b6847e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-04-05 15:53:51 +00:00
Eike Ziller
b3baed58c6 Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
2019-03-21 11:28:21 +01:00
hjk
0dbdc520a4 Debugger: Fix some perspective selection issue
Previously:
   - start combined debugging, stop anywhere
   - switch to QML debugger sub-perspective
   - switch to any other analyzer main perspective
   - switch back to debugger main perspective
->  QML debugger was selected in the sub-perspective chooser combobox,
but the visible views were the ones of the the C++ debugger.

With this patch, the visible views match the selected QML debugger.

Change-Id: I20e4bd6c07acb5e55c02f0a0ef042986f2e3f1f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-18 07:08:35 +00:00
hjk
b9b1ed9b14 Debugger: Remove unused DebuggerEngine::isStartupRunConfiguration()
Change-Id: I0e3773052495b3812b87959ef16077c5bee441a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-12 10:36:44 +00:00
Christian Kandeler
d0db212575 Resolve ambiguous results of searches for relative file paths
Qt Creator extracts file names from the output of external processes in
various places, for instance from compilers during the build. It often
happens that such file names are not absolute, so they cannot be
directly opened in an editor when the user clicks on their
representation in some widget. That's why they are processed by the
FileInProjectFinder facility first.
This patch enhances the FileInProjectFinder to be able to return more
than one candidate for a relative file path, and allows the user to
choose between these candidates where possible. This way, we won't open
a random file anymore when a project contains more than one file with
the same name.

Fixes: QTCREATORBUG-13623
Change-Id: Id19c9eace3e6b3dbde89f6528e6d02b55872d747
Reviewed-by: hjk <hjk@qt.io>
2019-03-04 09:52:13 +00:00
hjk
3fdb5f53e3 Debugger: Decouple combined engine rampdown further
There are apparently uses where one still want to have a fully
functional C++ engine even when QML is already done.

Task-number: QTCREATORBUG-21857
Change-Id: I5dfd80e5ff02dcc3e5e2d6b5913a75af071f53d3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-28 10:24:05 +00:00
Aaron Barany
21c0f5395e Debugger: Fix sizing of debugger columns
Added span column property to BaseTreeView. This takes an index to a column
that will span remaining space not explicitly taken by the other columns.
This listens to resizing of the tree view and columns that are manually
resized to keep the sizes consistent.

The stack view now once again uses the StackView class, which now sets the
function column as the span column. This will adjust the column size the
first time stack frame contents are encountered. It will not resize
automatically until it's re-created (the next debug session) so it doesn't
undo custom resizing. This also restores the ability to toggle stack
addresses. Some obsolete parts of this class were removed as part of
retrofitting it for the current state of the debugger.

Stack, breakpoint, and thread views now resize remaining space for the
function column rather than empty space at the end. This is generally the
most important field when debugging and can get very long, especially in
C++.

Task-number: QTCREATORBUG-21763
Change-Id: I821c83d1d951f3311d7fa9fcddcbdeedfeed1573
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-08 18:43:44 +00:00
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