Commit Graph

1357 Commits

Author SHA1 Message Date
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
1b751c2d47 Debugger: Allow watching complex expression for QML
Latest restructuring made the 'Add Expression Evaluator'
action to a no-op when not debugging.
Reflect this by disabling the action as long the user is
not debugging and allow complex expressions to be evaluated
for QML as well.

Fixes: QTCREATORBUG-19050
Change-Id: I2d6421a121e2169981b992a617f4d2b7264a8091
Reviewed-by: hjk <hjk@qt.io>
2018-09-24 13:37:12 +00:00
Orgad Shaneh
539b10727e Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggermainwindow.cpp

Change-Id: I07496916dd37b842d57ce5c49f99c079a9095a5f
2018-09-21 10:49:44 +03:00
hjk
6635f85d47 Debugger: Move some debugger specific bits out of debuggermainwindow.*
A step towards making the perspective handling independent of the
debugger plugin.

Change-Id: Ic07f4b34d44c48f16a494ba7f470e0a34d3d56a3
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-21 06:14:05 +00:00
hjk
0137e2ace9 Debugger: Do not guess kit when attaching using the app output pane
We have access to the kit that was used to start the project,
use that.

Change-Id: Ie73129d4ee4451f272ba7539c950409b5d9636af
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-09-19 05:50:08 +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
59e734d9da Debugger: Rename "Snapshot" window to "Debugger Perspectives"
That's what it is nowadays.

Change-Id: I0b9c29e9adc322a923c6901b6e1f3fc9937c2892
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-10 07:49:05 +00:00
hjk
c7f0285c4c Debugger: Consolidate breakpoint search
We already have a concept of Context when action on editor events,
use that directly when searching an (almost) matching breakpoint
instead of translating it into breakpoint manager's interface
language.

This also centralizes the guesswork for non-exact matches in one
place, making it easier to fix currently wrong matches later.

Change-Id: I5579e7e01792d425cad4ccf1dbcbbd1bd56c84ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-04 13:33:29 +00:00
hjk
a68e8c5b69 Debugger: Move session load/restore handling
... to breakpoint and watchhandler.

More modular this way.

Change-Id: I4a45481fcc2bfde67b164bd7274fb7b2a12cb7ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 09:38:38 +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
hjk
b97e9bd429 Debugger: Make Global Debugger Log off by default
It's more a debugging aid for work on the Debugger itself
than a feature of general interest.

Change-Id: I915019e28df6cf4a5c369ab2de45959943cd4dd4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-27 12:47:47 +00:00
hjk
fd25bbd99d Debugger: Re-enable breakpoint enabling via gutter context menu
Task-number: QTCREATORBUG-20970
Change-Id: Ie8fc2af8e99e82018a9b4262fe6053cb714e7d60
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-24 06:20:06 +00:00
hjk
468e71cbe4 Debugger: Remove two unnecessary captures of 'this'
Change-Id: Ic3bfa3d0539974087d08153a66a80f29a6ff8257
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-23 15:20:32 +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
e6e38df436 Debugger: Shift some perspective related API to the perspective class
Also, use QString uniformly for the (now rarely used) perspective ids.

Change-Id: I682062e7d179d0fcfd309e7714713bd1218bd8bb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-23 08:57:10 +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
263cf4c608 ProjectExplorer: Remove RunWorker::setDisplayName
It has been an obsolete alias for setId for a while and downstream
uses have been adapted.

Change-Id: I467370aa67054599c7771e8275d28e62ddc461fa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:02:22 +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
Eike Ziller
db9837fa6c Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/clangtools/clangtoolruncontrol.cpp
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: Ib1e8abf066898b50c90fc1ccba4697fe983e8a8f
2018-08-15 13:53:28 +02:00
hjk
1567679b81 Debugger: Tighten Perspective interface
Pass id in constructor, so it can be const.

Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-13 08:42:52 +00:00
Eike Ziller
8fa449126c Fix context of Locator input
- In the main window, the locator input (actually the status bar)
  visually feels like being part of the mode widget, so give
  it its context.
- In extra editor windows, the whole editor window should have
  "editor manager" context, so that is also active for the locator
  input.

Task-number: QTCREATORBUG-20626
Task-number: QTCREATORBUG-20071
Change-Id: Ib68d6a8177446572ea59c3cc057eca0706173e11
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-09 08:55:25 +00:00
hjk
d94cd5afcd Debugger: Fix parsing of server command line option
Task-number: QTCREATORBUG-20928
Change-Id: Iaa23555353f5b234c550763cdbd04d115d4e0eda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-09 08:06:50 +00:00
hjk
f45f1a8cef Debugger: Make perspective toolbar items part of the perspective
This simplifies the toolbar setup and removes the need for the
stack of toolbar widgets.

The actions themselves have been owned by the plugin already,
so nothing changed in this respect.

Change-Id: I44754e16c8fc2acc53633dd9d560b1e732eece27
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-06 11:12:44 +00:00
hjk
01f2b982a2 Debugger: Move ownership of perspective dock widgets to plugins
Similar to the previous patch, but affecting more plugins: with dynamic
perspectives lifetime is better managed close to the code that knows how
to (re-)construct the items.

Change-Id: I0e7bfcf769d198ec2afa88b972be900baa1b6a46
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-01 11:27:21 +00:00
hjk
be89452602 Debugger: Start introducing dynamic perspectives
Make perspectives and tool bars destroyable. This is a
step forward to multiply debugger engines whose perspective's
life time is connected to the engine, not the debug mode.

In the present setup there are two kind of perspective:
1 - static: with a lifetime associated to the application
(or, rather, plugin that defines them). These are listed
in the perspective chooser, later e.g. Debugger for
pre-set breakpoints
2 - dynamic: with a shorted lifetime, e.g. running GDB engine.

Presently, and possibly also in future so, a dynamic
perspective is related to exactly one of the static
perspectives, i.e. are kind of "child".

Change-Id: Ic11572e7121e14f8da2927a0c0ac3441c99073a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-07-31 07:38:38 +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
Tobias Hunger
05fb67fee7 ProjectExplorer: Use unique_ptr to store KitInformation
Change-Id: I406b6bed005fb7455e6ee41d81a2f314584a051a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-11 08:29:19 +00:00
Eike Ziller
d09b71d260 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/android/androiddebugsupport.cpp

Change-Id: I01c4880850ad25432a65bb32849365d2aeb0756f
2018-07-10 07:44:53 +02:00
hjk
cb572773c0 Debugger: Robustify MainWindow state saving
Save the state before child widgets are affected.

Task-number: QTCREATORBUG-20721
Change-Id: I1d0d1ca610b0a8e8904585953ecbb42dddee4827
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-07-06 13:42:05 +00:00
Tobias Hunger
4ceed778f8 Abi: Clean up constructors
Only have one constructor. Get rid of implicit conversion from QString
to Abi -- that seems rather non-obvious. Use Abi::fromString(...) instead.

Change-Id: Ic638d3d4022c465123449089b0679197a5eb445d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-15 12:12:01 +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
Eike Ziller
c8c6b28e22 Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h

Change-Id: I192b9e88f967182f3275b4b98abed1220c26daac
2018-05-28 16:10:23 +02:00
hjk
89049b6fa2 Debugger: Remove some dead code
Commented out in the analyzer base merge, and never missed since then.

Change-Id: I078b12a70970dc244bc4590520bdb1dd80d8b2ff
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 07:37:02 +00:00
hjk
94d41afade Debugger: Move cpp snapshot storage to cdbengine
It's the only one using it.

Change-Id: I95dc4918c82653710a47cb8d0043bb3241e954ac
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-28 07:36:32 +00:00
hjk
db1174b6b8 Debugger: Remove a parameter with fixed value
Internal::displayDebugger's updateEngine parameter was always true.

Change-Id: I27e91b7327ef7f4ccfb7718ad47fe5316660ea17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-28 06:52:43 +00:00
hjk
36b835ff0a Finish merging Runnable and StandardRunnable
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.

Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-23 08:48:36 +00:00
Eike Ziller
2278ebed1e Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp

Change-Id: I873a2fa112321225e7b478739fc017b01d24ce18
2018-05-14 09:44:43 +02:00
hjk
3cfc715d7d Debugger: Try harder to find a usable device
In remote setups without proper run configuration (e.g. attach
using the menu) there was no device available. In some situation
there's access to a kit, though, containing the right device.
Use it.

Task-number: QTCREATORBUG-20331
Change-Id: I54523f71fc10c9959901f36f3d62872d139279e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-11 07:56:33 +00:00
Christian Stenger
88ecdaaf00 Debugger: Ensure debugger console is created
Output panes must be created before handling the settings
which of the panes to display.

Change-Id: I0c391f4c56c517d5a9626735006d741f64cf161f
Reviewed-by: hjk <hjk@qt.io>
2018-04-05 08:13:01 +00:00
Eike Ziller
0b10ecc718 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/ios/iosrunfactories.cpp
	src/plugins/nim/project/nimproject.h
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprojectmanager/qmlproject.h
	src/plugins/qnx/qnxrunconfigurationfactory.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/winrt/winrtrunfactories.cpp

Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
2018-03-13 11:25:38 +01:00
hjk
37ef24114c Debugger: Move DebugInfoTask handling to plugin
This does not involve the engine (currently).

Task-number: QTCREATORBUG-19994
Change-Id: I07a628580bf99c988eb0df165d649d5cc0869c0d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-08 16:59:10 +00:00
hjk
8c2bac9359 Debugger: Do not create the console unnecessarily
Triggering console creation in the plugin destructor is not needed.

Change-Id: Ic21016e7a19fa08ea7dd03a8364aa6fc229bb2d1
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-28 13:56:21 +00:00
hjk
6b7db0bae8 Debugger: Remove use of addAutoReleasedObject
Change-Id: I9a435448e05f56521eaca7f6ba2ac7780950fa18
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-21 08:21:14 +00:00
David Schulz
0eb7bab20c Core: make useMacShortcut constexpr
Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-02 13:15:55 +00:00
hjk
1b87d19a64 Debugger: Modernize
Mostly nullptr instead of 0, but also a few bits of collateral damage.

Change-Id: I921991272aca921dcdecf302dfff3716e79dfc24
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-01 10:28:54 +00:00
hjk
ae28c1bd67 Debugger: Avoid using addAutoReleasedObject
Not needed anymore for normal operation.

Change-Id: I9e167d28bb45afd8f98d8b0fed6fce183fea32ad
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-01 09:59:15 +00:00