Commit Graph

1172 Commits

Author SHA1 Message Date
hjk
aba988cb81 Debugger: One more safety belt
Task-number: QTCREATORBUG-16179
Change-Id: I661669cd6bf0cf8945c198c9c8d113b7a81c3073
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-04-29 13:37:12 +00:00
Christian Stenger
b688d18de4 Debugger: Avoid nullptr access
Change-Id: Iff5c48d83fa7989798f1ff34868a5b37f439a744
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-26 15:22:10 +00:00
Eike Ziller
4a826ada04 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
2016-04-22 15:13:58 +02:00
Eike Ziller
6c2d890830 Show shortcuts in tool tips of debugger tool bar actions
These actions are supposed to behave exactly like the ones in the menu,
so use these.

Change-Id: I21b4a170839ec009d6462d033329cd6fda6b516a
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-22 08:21:25 +00:00
Alessandro Portale
5e32183c9b Theme: Separate run/stop/interrupt icons in menus
And for that, we also need separate theme color roles.

Change-Id: I27bf4499acb516f7f824f5e57632797653b150ec
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-21 15:57:56 +00:00
hjk
344849bdf3 Debugger: Guard DebuggerPlugin::m_currentEngine with QPointer
Change-Id: Id0bcca4ca2dba21409e37197269b8166070cf572
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-04-21 14:13:46 +00:00
Christian Stenger
3d28c516c6 Debugger: Avoid soft assert on close
Introduced with d432b14472.

Change-Id: Ic33d46a33efd1c09c162c6adc31526efd4fe2b9d
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-21 09:09:40 +00:00
Christian Stenger
d432b14472 Debugger: Avoid crash in plugin unit test
Change-Id: I38d74f4a34e14f646eaf9f24ca9dc2e14ba06050
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-20 14:39:13 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02: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
Alessandro Portale
397ebcac92 Debugger: Enabled state of "Threads:" label depends on thread combobox
...and making sure that items of a disabled combobox are visibly
disabled.

This prevents users from clicking on the Threads label before debugging
even started.

Change-Id: I59cc9b7e875fe8c126a9ee4221ff9d8322e4b1a8
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-18 11:25:37 +00:00
Orgad Shaneh
b2e048c10e Debugger: Fix language context actions
... again

Task-number: QTCREATORBUG-16099
Change-Id: Ie0a902a3161ca72cf78695639598eac5fdcbace5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-18 10:38:20 +00:00
Alessandro Portale
a24ce30425 Debugger: Remove QML application Zoom (for now)
It does not work.

Change-Id: I8340d6b130d3d7e1e8f1531fe4cd2b6cd9319c7b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-04-18 09:13:50 +00:00
Eike Ziller
8a77eacf8d Merge remote-tracking branch 'origin/4.0'
Change-Id: Ied609608f6b12aa923c67777bc5a273c4d8fbcbb
2016-04-15 10:07:55 +02:00
Orgad Shaneh
6655f87fca Debugger: Change default languages to NoLanguages
... which is set to CppLanguage in DebuggerRunControlCreator::enrich
unless set to anything else previously.

Remove related hacks.

Change-Id: I5fcc39326e280192eb1ddb652636e9342baef94b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-13 07:58:33 +00:00
hjk
c75b8f22fa Debugger: Remove special handling for event dispatcher files
Too much convenience seems to cause irritations.

Task-number: QTCREATORBUG-15638
Change-Id: Iaf90149372641bcb7fece28a7470558a80d77a4e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-13 07:28:55 +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
Alessandro Portale
9373f76b2a Icons: Move Run/Stop/Interrupt from projectexplorer to core
Change-Id: Iba65c2ede538049c9b203fd4c2f99ef552019862
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-10 20:08:43 +00:00
Alessandro Portale
63cbcbc729 Locator: Remove old "Locator" menu icon. Re-use the "search" icon.
This patch removes the locator.png icon and replaces it with a
menu-friendly variation of the zoom icon.

The current ZOOM icon becomes ZOOM_TOOLBAR.

Change-Id: I8817c5c420801351db659caa4c4190a9074be720
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-08 15:59:10 +00:00
hjk
5e47d35fcd Use Core::Id in ModeManager interface
Makes it more uniform to use and allows placeholder widget
creation to be independent of mode creations.

Change-Id: I4021bc9db7f8c78f0374c0cc3b3331506959afe4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-04-08 10:38:49 +00: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
Orgad Shaneh
e13f1a5047 Debugger: Fix memory leaks
Detected by memcheck.

Change-Id: I56c0c39f3aa2251d6425ddc9388fdebc511d7f47
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-26 17:25:04 +00:00
hjk
259c3cb4d4 Debugger: Fix object leakage on shutdown and heap-use-after-free.
Task-number: QTCREATORBUG-15938
Change-Id: I437756705c33730398a129651fabe34c92334656
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-24 15:02:56 +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
d27d51050c Debugger: Use kit macro expander instead of global one where possible
This is low hanging fruit enabling a lot more customization.

Change-Id: I1a90fa731ea512852c12a55fad75551efb44e875
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-23 08:11:47 +00:00
Tim Jenssen
c6849c5616 Debugger: fix crash in updateUiForTarget
- it happens while removing the only existing kit

Change-Id: Ifc2e9eae2836b496f9f696ff91e2999dc1904800
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-17 14:04:19 +00:00
Eike Ziller
78e9c178ae Debugger: Avoid switching to debug when the inferior started (or failed)
We already switch to debug mode when starting the run control.
Since loading of projects from the command line is delayed by the
project explorer plugin, and that switches to edit or projects mode, we
must delay the startup of the debugger when started from the command
line until the project explorer plugin really finished all
initialization.

Change-Id: Icfae2b39878084b024c40fa30a2e35f6a0b94a89
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-17 12:49:03 +00:00
Eike Ziller
b93f9af31a Debugger: Fix restoring of previous mode
We have many code paths now that try to make sure that we really end up
with debug mode when debugging, leading to multiple calls of
activateDebugMode when starting the debugger. Separate ensuring debug
mode from saving the previous mode to avoid that debug mode is always
the previous mode.

Change-Id: Ie9687e2de816b6ae55945b6108a5d4f760962f89
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-17 12:48:59 +00:00
hjk
35a16cc394 Debugger: Make some of the plugin tests compilable again
Change-Id: I5c3885cb385dc1c15dce14f2ff52bf70edee8399
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-16 14:04:05 +00:00
hjk
3c874a0d0c Debugger: Re-enable initial population of register view
Registers are only retrieved if the view is visible.
When it becomes first visible, an extra poke to initiate
population is needed.

Change-Id: I67c3e166ce98e6405707f8457ebd32d0d1939229
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-15 12:06:17 +00:00
hjk
c09ebb8f13 Debugger: Re-enable retrieval of register content
Less use of magical object names.

Change-Id: I2da17f1cefe1a72f4ea8be4c041e7443265def93
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-15 08:47:21 +00:00
hjk
0196de330b Debugger: Avoid proxy action loop
Use the real start action data to Initialize the toolbar start proxy
action with the real action, not the menu action.

Change-Id: I498ba0069e9f259f90122eb6378c79f08e4d24d1
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-14 13:29:08 +00:00
hjk
48fb9e1855 Debugger: Move main splitter creation to DebugMainWindow setup
To allow other mode main windows to re-use the perspective
concept.

Change-Id: Icf00b4f0e4bd73a09ebec131ef9c578154f25eec
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-11 08:08:11 +00:00
hjk
6884b377db ProjectExplorer: Remove project parameter from PEP::canRun()
.. and rename it to canRunStartupProject().

It's only ever used with the startup project. No need to let
all callers retrieve it by themselves.

Change-Id: I24e56ce339bde70d96e28db51e6ddcf75c277ceb
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-10 10:42:14 +00:00
hjk
de127b1f5c Debugger: Remove unused showPromptDialog function
Change-Id: Ie8f2cc905cb5e39c5419837e298c37ed4e1ec377
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-10 10:03:33 +00:00
hjk
f294d3e6be Debugger: Remove one indirection in Debugger::registerAction
... and the now unused action id -> action description hash.

Change-Id: I36ad3658b52fcf32b628620b5cc2bd98bc2ac849
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-09 11:43:38 +00:00
hjk
ea29a83095 Debugger: Do not switch to undefined perspectives
This implies switching to Debug mode and is currently triggered
by the GammrayIntegration. Avoid it as long as GammaRay has
a mode of its own.

Change-Id: I6174554610038cb66fb1bc977dc537b47941a1d8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-09 10:17:56 +00:00
Orgad Shaneh
95d8ed71db Debugger: Re-add language-dependent context
Lost in f3bd7412ef.

Change-Id: I6091db212eff8a4ac15c67e99d9e88fab5b11647
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-08 09:58:00 +00:00
Orgad Shaneh
4c3a144830 Debugger: Add a missing space in language listing
Change-Id: I78a57c5edba1d7cfd59b8b4a93b41fb4ab3ae936
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-08 09:51:47 +00:00
hjk
92e301a054 Debugger: Merge debug mode and analyze mode
On the user-visible side, only the 'Analyze' mode button disappears,
and instead a combobox to switch between different tools in appears
in the Debug mode toolbar.

Internally, that's quite some re-organzition: The centralized
'Analyze mode is busy' flag is gone, allowing us to run e.g.
ClangStaticAnalyzer and MemCheck in parallel.

Analyzer tools and debugger now share the same mechanism to
generate/load/save dock widgets.

Analyzer tools now create and handle their own start/stop button
when appropriate. In general, Analyzer tools can create/handle more
than one run control at a time.

Further consolidation is possible, e.g. RunControl state handling
could be merged into the base ProjectExplorer::RunControl to
avoid the still existing duplication in ~15 instances.

Change-Id: I91e5940ebc4211f98056d507cf2f7b5f8efe7f07
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-07 15:06:10 +00:00
hjk
9ff81d5c68 Debugger: Make Perspective status label global
After some discussion we agreed that the contents is ephemeral
and does not need to survive perspective switching.

Change-Id: I41de6a8f9478e4bd229c8b204ef7a3fa0a344b75
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-02 13:14:14 +00:00
Orgad Shaneh
c5f60bcc7c Debugger: Fix compilation without tests
* Some functions were inside WITH_TESTS section.
* MSVC requires Perspective::Split to be explicitly exported.

Change-Id: I272cefc5c4f446415b2714595f8b398f8ce010a4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-02 08:52:30 +00:00
hjk
f3bd7412ef Debugger: Remove return value from AnalyzerManager::createDockWidget()
Change-Id: If6cd2a68f2f99a1977ded0f05a12790194143274
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-02 08:08:15 +00:00
hjk
397e6546e1 Debugger: Split debugger main window implementation
... into a plain Utils::FancyMainWindow object and the debugger
specific functionality in Debugger::MainWindow.

A step forward to share the Utils::FancyMainWindow with the
(Ex-)Analyzer MainWindow and towards merging Analyzer and
Debugger mode.

Change-Id: I50e89d9d615226cb9b9af1a653c7383468e40a93
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-02 08:05:23 +00:00
hjk
aaf05f5acd Move analyzerbase to debugger
This is the first mechanical step to execute on the 'shared pool of
debugger/analyzer views' idea.

Future steps would be providing infrastructure for the view pool,
making all analyzer/debugger views use the pool and then re-extract
a sensible base for a 'analyzer-and/or-debugger' tool plugin interface.

Change-Id: I1bb392e6dd3084fc56937956bee1d6fd9530335d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-25 12:31:06 +00:00
Tobias Hunger
f4296d7504 ProjectExplorer: Modernize
* Use override where appropriate
* Use pragma once
* Make more constructors explicit

Change-Id: I2865fe10f288e3de570826058e43b70a0cb4ee37
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-03 08:29:08 +00:00