Commit Graph

102 Commits

Author SHA1 Message Date
hjk
dfb825e2a7 Debugger: Fix running on RemoteLinux
This (temporarily) works around the start up regression due
to wrong order of merged patches.

Change-Id: I7a386fb06175363aa23862716687764b930c52d8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-04-21 08:08:37 +00:00
hjk
d049a5be19 Debugger: Base magic Qml connection discover on base run control signal
Less debugger specific code and less convoluted paths in debugger
message handling.

Change-Id: Ib298889c386d65f17acbdfc585188097bb20ed74
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-20 14:57:57 +00:00
Eike Ziller
88897f3a87 Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/genericprojectmanager/genericproject.cpp
	src/plugins/genericprojectmanager/genericproject.h
	src/plugins/genericprojectmanager/genericprojectnodes.cpp
	src/plugins/genericprojectmanager/genericprojectnodes.h

Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
2017-04-19 09:56:14 +02:00
hjk
5d97c4871a ProjectExplorer: Remove startRunControl()'s runMode parameter
It is redundant, as a RunControl has a runMode() getter.

Change-Id: Ia048b271a5003356d21f86a3f778827d23466037
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-04-12 12:11:49 +00:00
hjk
ee27248a56 Debugger: Streamline DebuggerRun{Control,Tool}Setup
Only one code path needed once we have a RunConfiguration.

Change-Id: Ib65f471a929a0c70694dd142b4f83be7eebbe151
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-12 11:56:44 +00:00
hjk
cd47065bf0 ProjectExplorer: Use a lambda to parametrize promptToStop handling
Less coupling than using virtual functions for better re-use.

Change-Id: Ibbab38175538f65c0f563129c87e01736ed220af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-12 07:52:58 +00:00
hjk
27c8c74813 Debugger: Move engine construction into RunTool constructor
Makes using code closer to the intended run control/tool setup
pattern.

Change-Id: Id898338008588227e778fe3835b96740996c3691
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-11 11:29:16 +00:00
hjk
49b98f1149 Debugger: Make DebuggerRunTool (more) responsible for output
Make DebuggerRunTool accessible to downstream users, but remove
the non-standard handleApplicationOutput from the run control
itself to move it closer to the base run control.

LogChannel and Utils::OutputFormat should merge at some time.

Change-Id: I47b0f0067e1427b25e47036c3d4bc6ed5eed6189
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 13:13:11 +00:00
hjk
9177fd60ca Debugger: Introduce a DebuggerRunTool
The DebuggerEngine cannot be promoted directly as in case of
combined debugging we have three DebuggerEngine at the same
time, but the base RunControl is only (and should be) able to
handle one tool. So introduce a DebuggerRunTool base-RunTool
derived class that's only a thin wrapper on the (master)
DebuggerEngine.

Change-Id: I948833f4cff68c7d6e3dfa43b28328b862d6ae81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-10 10:49:16 +00:00
hjk
48c25d4d2b Debugger: Reorganize RunControl creation
Move engine creation closer to RunControl creation, One step closer
to switching orders and making the engine a RunTool.

Change-Id: I37e9c4fcca9381cc0b8fb14b98c892eef8cb1215
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-07 12:05:06 +00:00
Christian Stenger
1024d25e93 Debugger: Remove output processor from RunControl
The same functionality is available by using signals of the RunControl.
This reverts ca3bcd81 partially.

Change-Id: Id1d4d6e8326be60cdbe7c862dab46f49dbc6abe7
Reviewed-by: hjk <hjk@qt.io>
2017-04-06 13:53:57 +00:00
hjk
8e56c5be3e Debugger: Simplify DebuggerRunControl construction
The indirection was to prevent "others" to create "wrong"
DebuggerRunControls, but this is getting into the way now when
making the DebuggerRunControls/DebuggerEngine a ToolRunner.

Change-Id: I6c45e28affebc6b8db16c5d4bbc77325ef63604f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-04-06 08:51:10 +00:00
hjk
0410f4e0ba Debugger: Remove some useless assignments
That object is destructed soon, no data is ever read back.

Change-Id: Ida479c4dd934c6f45621b54adcfeda3f573a00bd
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-04-05 15:26:50 +00:00
hjk
2360a2d743 ProjectExplorer: Run RunControl::{start,stop} always asynchronously
This introduces a mini-state-"machine" to handle RunControl states
Intialized->[Starting->Running->Stopping->Stopped->]*->Finished.

Needing time between trying to start and getting feedback is nowadays
the normal setup for all remote targets as well as for most local tools.
Making that the default for all runs simplifies the code and provides an
opportunity to (a) fix some currently wrong reports of "stopped
immediately" and (b) to remove target-specific (WinRT) or tool-specific
(Valgrind, GammaRay) state members doing essentially the same.

Change-Id: I7f52fee41144188ee8389e922fdc265f8c0a6459
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-24 13:37:46 +00:00
Tobias Hunger
e07c6383d7 ProjectExplorer: Unify RunControl setup/teardown
Provide protected methods in RunControl to handle the notification
of when the RunControl starts and stops. Use these helpers to
move the isRunning() method into the RunConfiguration itself instead
of reimplementing it everywhere.

Change-Id: Ia8de42f7a6a14a049870d4e7fcb9af6756c2caa4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-01 12:46:59 +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
Christian Stenger
beec36c7d3 Debugger: Allow debuggerruncontrol creation with warnings
Change-Id: I50092cb99c24ab31fafb1b5ce3c0b371adc42f38
Reviewed-by: hjk <hjk@qt.io>
2016-11-10 05:46:06 +00:00
Eike Ziller
c635c6b50a Merge remote-tracking branch 'origin/4.1'
Conflicts:
	share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml
	src/plugins/android/androidrunner.cpp
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
	src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.h
	tests/system/suite_WELP/tst_WELP03/test.py

Change-Id: Ibac4d71d4f4dbe1e4f05052d2f8a2dcfd82edd4c
2016-09-13 12:15:09 +02:00
BogDan Vatra
258dc5d2e4 Fix debug on Android 6+ with NDK r11+
Task-number: QTCREATORBUG-16721
Change-Id: Ic65f13076794b75d6e4551b68d26fd3752f82098
Reviewed-by: hjk <hjk@qt.io>
2016-09-05 08:07:37 +00:00
Christian Stenger
ca3bcd811e Debugger: Provide way to process debuggee output further
Output coming from the debuggee was limited to be printed inside
the DebuggerLog and the Application Output pane, but the output
might be useful to process differently or even additionally to
the default logging.
Provide functionality to be able to add an output processor.

Change-Id: I715b90b28c64d3cf95bcc2a047a5aba1a56d1058
Reviewed-by: hjk <hjk@qt.io>
2016-08-31 04:39:16 +00:00
Eike Ziller
841778ed69 Merge remote-tracking branch 'origin/4.1'
Change-Id: I80f96f100046625f24b6ab5d13fdb05660365abc
2016-08-22 16:30:56 +02:00
hjk
46191b2e86 Debugger: Fix environment settings
... for "special" starts like Debug->Start Debugging->Start
and Debug External Application.

Change-Id: I9f9e682f4392efb5328eb8c08bf50dd33901f41d
Task-number: QTCREATORBUG-16746
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-08-22 12:45:17 +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
20db17e4f0 Debugger: Only use random QML port if none was given
Change-Id: Ice80ac46d5b8a0f24fa3b18ad8197b360fb6361f
Task-number: QTCREATORBUG-16708
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-04 07:21:45 +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
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
Eike Ziller
9e66ce48e4 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/autotest/testcodeparser.cpp
	src/tools/clangbackend/ipcsource/clangbackendclangipc-source.pri
	tests/unit/unittest/unittest.pro

Change-Id: I9db4fbea6ea7c9fdd0d8e1703735af20c92e754b
2016-05-09 16:37:41 +02:00
hjk
c813b5f31c Make local custom executables run independent of device selection
Task-number: QTCREATORBUG-16199
Change-Id: I1e9e2103e626c6480fa1c5ac9b2b3f8ac93e3038
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-04 14:26:36 +00:00
Eike Ziller
0f94aa3f4d Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/projectwizardpage.cpp
	src/plugins/projectexplorer/xcodebuildparser.h
	src/plugins/qmldesigner/qmldesignerplugin.cpp
	src/tools/clangbackend/ipcsource/translationunits.cpp

Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6
2016-05-03 11:49:01 +02:00
Orgad Shaneh
9ca0e50959 Debugger: Set symbol file on dialog-started debugging
Like Attach to Running Server

Change-Id: If8b5a8ed367edb82c50eb0e4b5c07a5aaf76396e
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-03 05:22:10 +00:00
Eike Ziller
a3880c4916 Merge remote-tracking branch 'origin/4.0'
Change-Id: If0ba896a083392a532f76bb26bec3540a7c17667
2016-04-25 13:27:14 +02:00
Alessandro Portale
600693af2c Debug start Icon: Use the toolbar variant
I missed to change these in
5e32183c9b

Change-Id: I54740576f8a5b99d3c588f759b2337601b1e8dd5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-22 23:01:12 +00:00
Ulf Hermann
385237dbbd Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port.

Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-20 11:06:34 +00:00
Eike Ziller
8a77eacf8d Merge remote-tracking branch 'origin/4.0'
Change-Id: Ied609608f6b12aa923c67777bc5a273c4d8fbcbb
2016-04-15 10:07:55 +02:00
hjk
2e9b52d084 Debugger: Consolidate extraction of project related data for run
Setting projectSourceFiles etc once is sufficient.

Change-Id: I340406e2f7de82bd9919aa9ec0ff1982b2118e59
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-13 13:19:25 +00:00
hjk
641b511430 Debugger: Disable re-run from application output pane
... for QML engine, which currently does not handle state
transitions in that case.

The normal debug button (or <F5>) of course still work for
starting to debug the current project, which is in most
cases effectively the same.

Change-Id: I02ebf989030a6eb7ff919add6ccc20e7230d9cc1
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-04-13 10:15:49 +00:00
hjk
176f925770 Debugger: Merge remaining pieces of RunControl creation
Change-Id: Id59ee3f214dcc9c6551ecbaae122e333257c1ce5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-13 07:30:01 +00:00
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
Orgad Shaneh
7dc2cb9d95 Debugger: Support only C++ on Windows post-mortem debugging
Change-Id: Idc759cb0a5a64fe33ea54eb4d0bf21df2a651bd9
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-07 08:46:56 +00:00
Eike Ziller
1ae483fc83 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/libs/utils/tcpportsgatherer.h

Change-Id: I495f3e05789f09efb8b1e84827893423a5b5b60c
2016-04-05 14:11:47 +02:00
Christian Stenger
40b6413201 Debugger: Fix crash on close while debugging
Task-number: QTCREATORBUG-15987
Change-Id: I510add216ec16c0c6622870f26c68c16e99769ed
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-05 10:21:03 +00:00
Oswald Buddenhagen
e426d08e54 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/debugger/debuggerruncontrol.cpp

Change-Id: I81b43480a1369e3d7be60ae26e812dda6b962b0b
2016-04-01 17:31:39 +02:00
Alessandro Portale
ea1f5d2b6c Icons: Move debug run/interrupt/continue/exit from core to elsewhere
Core contains the small variants of debug run/interrupt/continue/exit
while the bigger icon variants are in projectexplorer or debugger. That
does not seem to have aany reason, at least in today's state of Qt
Creator architecture.

But above all, it stands in the way when changing debugger icons as
planned due to user feedback.

This change moves:

   Core::Icons::DEBUG_START_SMALL
to ProjectExplorer::Icons::DEBUG_START_SMALL

   Core::Icons::DEBUG_EXIT_SMALL
to Debugger::Icons::DEBUG_EXIT_SMALL

   Core::Icons::DEBUG_INTERRUPT_SMALL
to Debugger::Icons::DEBUG_INTERRUPT_SMALL

   Core::Icons::DEBUG_CONTINUE_SMALL
to Debugger::Icons::DEBUG_CONTINUE_SMALL

This change just moves icons across modules but does not change anything
in the UI.

Change-Id: I859b901c312d4d16b6c2f687395a7b48c90aab84
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-01 14:26:03 +00:00
Eike Ziller
48ef713da3 Debugger: Fix build error introduced by merge
Change-Id: I9385490a524c45129a1a190e90e940410ead6355
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-23 15:28:26 +00:00
hjk
e16b02c680 Debugger: Move kit guessing out of run control creation
It's only used when starting with a -debug command line and
when attaching to a running run control. No need to clutter
the normal codepaths with it.

Change-Id: Ib374c64a7f63fa79e88967573c37a5da1f415d50
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-23 14:19:19 +00:00
hjk
0301a703ec Debugger: Remove unneeded re-init of RunParameters::useTerminal
... and some dead code.

Change-Id: I22fc6f8ecc09c4c3b928d7b7a510e762a54c0f8f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-23 14:12:01 +00:00
Eike Ziller
467def6996 Merge remote-tracking branch 'origin/4.0'
Change-Id: I3f28f1f53cf2b2228928fbd7accf25d87bb40243
2016-03-23 14:15:31 +01:00