Commit Graph

1178 Commits

Author SHA1 Message Date
hjk
112e32228a ProjectExplorer: Merge AnalyzerRunControl into RunControl
The change is "conceptually wrong", the AnalyzerRunControl derived
classes' functionality should be provided by ToolRunners based classes
encapsulating/"being" the current Analyzer*Runner classes.

However, the AnalyzerRunControl is only three (empty even) virtual
functions, but a big obstacle in merging attempt due to a lot of
mechanical followup changes in downstream users.

The current construction mechanism of analyzer run controls is actually
two different mechanisms (locally direct RunControlFactories, and a
"generic" createAnalyzerRunControl wrapper for remote cases). The generic
createAnalyzerRunControl makes it difficult to migrated them one-by-one,
due to the various downstream users.

So instead of merging the per-analyzer two uses directly reduce
the "indirection" distance by removing the AnalyzerRunControl
intermediate layer. After that the createAnalyzerRunControl mechanism
can be dissolved by using normal RunControlFactories also for
the remote cases. After that, porting to ToolRunner, and combining
with ther local equivalent can be done one by one.

Change-Id: I0ddace33fcce210cf3a547ac5bb23b3d85013934
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 13:47:53 +00:00
Orgad Shaneh
8a4b0aeabf Debugger: Fix crash on shutdown
If the application fails to start (like an empty exe file), the debugger
remains in "active" state, and it crashes on shutdown.

Change-Id: I6ae3a98d507856ea40375edb15c9ea4605e3efc6
Reviewed-by: hjk <hjk@qt.io>
2017-04-04 14:30:06 +00:00
hjk
32ae4d3e09 Debugger: Use Utils::ProcessHandle for DebuggerEngine::m_inferiorPid
That's the intended "typesafe" use.

Change-Id: Ib288fe87a47bd9484bda83e05406f0d22989b3c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-01 07:56:18 +00:00
Eike Ziller
1704c484a8 Merge remote-tracking branch 'origin/4.2'
Change-Id: I9006dd493707ae626ae3502541599c8789e1aab0
2017-02-27 15:17:37 +01:00
Eike Ziller
d64e17ad55 Move mimetype definitions to plugin specs
- Avoids the hassle of QRC files and manually registering mime types
- Avoids performance regressions because of mime types that are
  registered after mime database has been used
- Makes it technically possible to detect that a disabled plugin could
  handle a mime type if it was enabled

Change-Id: I373008b1b56e9c6b4853055f20b3eeb112a6eff9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-02-27 13:54:59 +00:00
hjk
4637b3fed7 Debugger: Don't crash if targets vanish if the last kit is deleted
Task-number: QTCREATORBUG-17702
Change-Id: I42cc08cab67f57d749898f5b01925b7ef3658165
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-23 10:04:32 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
hjk
eb579dec4f Debugger: Avoid some signed/unsigned warning
Change-Id: Ie61b0b33a912591927db7f3173f50ee100d52faf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-22 09:37:06 +00:00
hjk
a4c0712cb2 Debugger: Add a message when trying to evaluate a bad expression
Change-Id: Id10f11876e9b6c852a04add6bd75aec7e8337891
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-21 12:26:27 +00:00
hjk
1336826460 Debugger: Make "Add Expression Evaluator" available in QmlJS editor
Task-number: QTCREATORBUG-17754
Change-Id: I249e904634edbfd30bd11a4402470c3d5586478c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-21 11:20:09 +00:00
hjk
7f73f3950e BaseTreeView: Make resizeColumns() publicly accessible
Simplifies the only used code path through the model and a custom
signal.

Change-Id: I9bbab725cdd122b7261a8f14b101786e38e61e57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-21 09:16:51 +00:00
hjk
56409f5afa Replace a few occurrences of QStringList() << ...
... by something shorter.

Change-Id: I363b4e509adb07997517b2d233246a333aea4aea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-02-08 11:21:45 +00:00
Eike Ziller
b299ff19ec Merge remote-tracking branch 'origin/4.2'
Conflicts:
	src/shared/qbs

Change-Id: Ic39fd1c411632f56312fae31c0c88ebc1098b5a4
2017-01-30 10:55:40 +01:00
Filipe Azevedo
28fd07e95a Add api to get some debugger state about engines
That’s needed for GammaRay integration.

Change-Id: I67a5dba81fa8d88024395126c45d0a3e9cfdd457
Reviewed-by: hjk <hjk@qt.io>
2017-01-26 14:00:12 +00:00
Tobias Hunger
5d213cc5da Debugger: Add missing #include <utils/temporarydirectory.h>
Change-Id: I45f104511f4ae840b42d4e1f7808953860c039a9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 15:01:52 +00:00
Tobias Hunger
c6f90e575e Utils: Introduce a TemporaryDirectory and TemporaryFile class
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".

Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:17:10 +00:00
Tobias Hunger
25fbcca96b KitManager: Get rid of KitMatcher class
Use std::function instead. Clean up API while at it.

Change-Id: I6e401ab57f5375e36710c30508c596af3f4b3385
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-18 10:39:16 +00:00
hjk
99f2c07403 Merge DebuggerItemManager and DebuggerItemModel data
Change-Id: I400fe94316433c538f82badde12ad704d722d730
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: hjk <hjk@qt.io>
2017-01-16 17:29:34 +00:00
Tobias Hunger
1b0c2a28d1 Debugger: Fix cdbMatcher to match on wordsize
Change-Id: Iaf08cefb9327628d79a87e8664c38f96b6894e8c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-01 14:54:51 +00:00
Filipe Azevedo
27d155636a Export currentPerspective() from debugger window
Change-Id: Icef2b21e86f678bdd9f10dc26197db97bba6ade9
Reviewed-by: hjk <hjk@qt.io>
2016-11-22 13:25:28 +00:00
hjk
80b2a4f1ba Debugger: Expose DebuggerKitInformation::ConfigurationErrors
... to allow more fine-grained decision making for kit choosers.

Change-Id: I9a4e97f7b4f4b074e1c764f6b134c15e2896dc79
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-16 08:37:35 +00:00
hjk
5a9b6bb694 Debugger: Shrink location marker in breakpoint and thread view
Fixes a recent regression.

Change-Id: I4202ec62c9fa165e7f602c11a92eb1bf8bbe73f0
Reviewed-by: hjk <hjk@qt.io>
2016-11-01 12:22:39 +00:00
hjk
e9c4d4a56b Debugger: Make icons in breakpoint view smaller again
Change-Id: I05e68f5ab7004f063ba8577a78bad23a51a06330
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-10-05 16:09:10 +00:00
Eike Ziller
90cf4487a5 Merge remote-tracking branch 'origin/4.1'
Conflicts:
	src/plugins/autotest/qtest/qttestoutputreader.cpp

Change-Id: I4b323f2f3041d015fa04b9a25ec925f3b3e2411f
2016-10-05 15:28:04 +02:00
Eike Ziller
a47ad71b60 Fix that editor actions were disabled in navigation bar in debug mode
The mode widget needs the editor manager context, not only the debugger
main window.

Task-number: QTCREATORBUG-16543
Change-Id: Ibe92043a374d9fd507e62998f67c0ce897b198e7
Reviewed-by: hjk <hjk@qt.io>
2016-09-29 09:58:12 +00:00
Ulf Hermann
72cca4855d Debugger: Have main window handle mode change separately
On shutdown the DebuggerMainWindow might not be alive anymore. By
connecting the signal handler to the window, rather than the plugin we
avoid dereferencing null pointers in that case.

Change-Id: I6421eebc6b1b76f176b31eafeb039d91edd3f0b3
Reviewed-by: hjk <hjk@qt.io>
2016-08-26 11:52:23 +00:00
Ulf Hermann
8951394704 Debugger: Don't reselect a perspective if it is already active
Selecting the same perspective again will not result in any visual
changes, but repaint the whole window. This is unnecessary overhead.

Change-Id: If41464ea023b2085482d5ab547cd9eeb91ce047f
Reviewed-by: hjk <hjk@qt.io>
2016-08-23 10:30:50 +00:00
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Orgad Shaneh
1853f01a5b Merge remote-tracking branch 'origin/4.1'
Change-Id: Ia442f30f387fe9292217582260bbe79e54608810
2016-08-05 11:40:07 +02:00
hjk
588443b259 Debugger: Use a StandardRunnable for the debugger process
One step further to separate the debugger environment from the
inferior environment and to make it possible to configure a
working directory. Guessing one from the inferior's working
directory is not always a good idea.

Change-Id: I33d139c0f228ec0870556b82bc6aecca0a8e62d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-04 10:07:43 +00:00
Ulf Hermann
4bbd89d1b3 Debugger: Register step out action also for QML
Change-Id: I11dceb325d5611bb5a0d9fb9750dbefdea60f2dc
Task-number: QTCREATORBUG-16691
Reviewed-by: hjk <hjk@qt.io>
2016-08-02 11:16:45 +00:00
Orgad Shaneh
1b34f2a4b8 Merge remote-tracking branch 'origin/4.1'
Change-Id: Ia90424d479936a898705c433e5810c77ae088b2c
2016-07-22 15:18:00 +03:00
hjk
ff6251cbe2 Debugger: Fix handling of extra updates on view visibility changes
Using a lambda in the connect was wrong here, as the m_currentEngine
member may change before the body gets executed. Indirect to a member
slot again, which then can use an up-to-date m_currentEngine.

Change-Id: Ice906a31d2ba0655daffda67ae378acc98aa3698
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-21 12:33:42 +00:00
hjk
2d79bdc29c Debugger: Remove some uses of semi-global currentEngine()
Make use of recent TreeModel improvements in various
tool views, push more operations into the engine-
owned data models, specifically context menu creation.

Change-Id: I479c97102b9fb81611c6461c6df1cec59295179a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-07-18 11:17:53 +00:00
Tobias Hunger
32b484e26e Introduce ToolChainKitInformation::targetAbi(Kit *)
Use that in the debugger. That simplifies the logic a bit.

Change-Id: Ia72607283373ee0f89a91f347db0ef2c87cf9fb3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:46:47 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
hjk
2a104dcfe7 Debugger: Consolidate icon storage handling
We settled now on global objects being fine for the purpose
in Core and ProjectExplorer, so there's no point in using
something more fancy in the debugger.

Change-Id: I72e45f398c09d22894419c274dfbea77da0fc153
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 14:28:01 +00:00
Orgad Shaneh
7d31cb0e18 Debugger: De-slot
Most Qt4 connects are gone.

Change-Id: Ie74cfb11fc4b4c531f9e22c95a4d18336e1c29e8
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-28 06:20:21 +00:00
Eike Ziller
4f9016e03f Merge remote-tracking branch 'origin/4.0' into 4.1
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/android/android.qbs
	src/plugins/android/androiddevice.cpp
	src/plugins/autotest/testcodeparser.cpp
	src/plugins/debugger/analyzer/analyzerstartparameters.h
	src/plugins/projectexplorer/devicesupport/desktopdevice.cpp
	src/plugins/projectexplorer/devicesupport/idevice.cpp
	src/plugins/projectexplorer/runconfiguration.h

Change-Id: I2474d06f2309fa71210a8401846bc2ef85bebf1d
2016-06-22 11:09:32 +02:00
hjk
3f11ef9216 Avoid using dynamic_cast<>
dynamic_cast<> breaks in cross-library situations. In the past
the issue was witnessed on Mac, this time on FreeBSD in
various configurations.

The workaround deployed here is to manually create unique
type ids in form of (addresses of) global variables.

Task-id: QTCREATORBUG-16462
Change-Id: Ie28fbb3d31d06c1a722a3d9ea808831191298e71
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ralf Nolden <nolden@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-22 07:31:41 +00:00
hjk
78a800cb34 Debugger: Use dedicated structure for Qml server parameters
The main idea is to start using ProjectExplorer::Connection later.

Change-Id: Ie91eacdfb0e93ae142fec7ce32bcf554a5282122
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-14 06:25:34 +00:00
hjk
726b907cc3 Debugger: Remove debuggerstringutils.h
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-09 08:09:46 +00:00
hjk
db9437c2e8 Generalize IDevice::qmlProfilerHost
The idea is to have a way for tools to specify what kind of
control channel they would like to use to communicate with
a device without making the choice explicit dependent on
the exact kind of tool to further decouple device and tool
implementations.

The 'hint' values are there to help the device implementation
to decide on which channel to use exactly in case there are
multiple choices. In any case, the tool is responsible to
check that the returned channel is suitable for its operation.

Currently the only choice is "QmlControlChannel" yielding
a simple wrapper around the former IDevice::qmlProfilerHost()
return value.

Other enum values may potentially be {Tcp,LocalSocket}ControlChannel
(to specify a type of transport) AdbChannel (to specify some
generic helper mechanism). It might also turn out that something
more complex than an enum will be needed, e.g. to express
a set of values with priorities or such, but I'd rather
avoid overengineering for now.

Change-Id: Id386425eb3dd2bb395065f0bdb6f67217cd40a71
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-06-08 08:16:22 +00:00
hjk
58f25a3260 ClangStaticAnalyzer: Start tool directly in test
Removes the only user of DEBUGGER_EXPORT void runAction(Core::Id actionId)

Change-Id: Ia26577e07ccc8a556882d99d6dd9f9c29c3bc883
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-01 08:45:17 +00:00
hjk
ae19d452b6 Debugger: Move remaining Analyzer overlay icon to ProjectExplorer
It's the only remaining item and loosens the dependencies of
ex-AnalyzerBase based plugins on the the Debugger.

Change-Id: I943ac44401c440dd6d3d5c1f54f8f996accd2b4a
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-05-30 15:07:26 +00:00
hjk
4320aeea18 ProjectExplorer: Move Runnable/Connection model into class
Somewhat better encapsulation.

Removes the "false" sharing of Concept implementations, and takes
the opportunity to change the operator==() into a 'canReUseOutputPane'
function to be explicit about its only use.

This doesn't solve the change in output pane reuse behavior yet,
but provides the base to put the required logic into canReUseOutputPane,
as opposed to abusing the general equality concept.

Change-Id: Id9e4e6b8601c5fcf40a252fb423c2c4c2b74ddb6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-20 10:05:41 +00:00
Eike Ziller
ec231b5910 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/valgrind/valgrindruncontrolfactory.cpp

Change-Id: I96c0f8cc3b49f8f55f45ef1f839857f878f532f4
2016-05-18 12:12:46 +02:00
Christian Stenger
8daaa2f651 Debugger: Restructure cleaning up after test
If the test case would result in a failing test it does not
execute further commands.
Ensure to close possible open editors even for failed test runs.

Change-Id: Ifcdcb76de5d10f649d38b84dad8999c6fd491ade
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-18 07:16:26 +00:00
Alessandro Portale
ad55f0bd84 Debugger: Proper menu icon for "Profile Costs of This Function..."
Don't use the toolbar variant, there.

Change-Id: I820d3e51567bfeff4eec2277f20b52fb617d1eee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-17 10:49:06 +00:00
hjk
df8e3b5925 Debugger: Let perspectives specify their central widget
The default 0 value will be interpreted as 'use the editor stack'.

Also, drop the idea of value semantics for Perspective objects
to get a simpler approach to the destruction of owned widgets
(tools docks + central widget)

Change-Id: Ic6470411ee5d387c43447f95b5a12c81c6658ff8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-13 11:34:00 +00:00