Commit Graph

1200 Commits

Author SHA1 Message Date
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
hjk
2cf0060596 Debugger: Use StandardRunnable in DebuggerStartParameters
This is a mechanical replacement for the former executable, processArgs,
inferiorEnvironment and workingDirectory members.

Change-Id: I4160e01427ed801df9b729f1f31d0a2ca48159b5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-28 14:15:54 +00:00
hjk
9ae2ce7629 ProjectExplorer: Drop LocalApplicationRunConfiguration
The functionality can be provided by producing a suitable Runnable
in the derived classes directly.

Change-Id: I7b8e8fe33fffd2b00176b6cf6633eca4e152e466
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-26 10:09:29 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
cfc89a685e IDocument: Rename defaultPath and suggestedFileName
To fallbackSaveAsPath and fallbackSaveAsFileName. That makes it clearer
what they are for, and that they actually belong to each other.

Change-Id: Ie5b83b9db77d39a7fe9e979cc8f22b7f5b9101a3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-01-14 14:40:45 +00:00
Ulf Hermann
42d570a3fe Rename Project::ExcludeGeneratedFiles
We want to distinguish between source files and generated files. So
let's call them by their names.

Change-Id: I324c4b82ca7fb7d8d0e175ea6c4f14f1306ec929
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-13 14:12:08 +00:00
Orgad Shaneh
68ef643af3 Debugger: Refine newline replacement in status message
Replace newlines with a semicolon followed by space

Change-Id: I99b1a802248787546f7b2a1483a69201ea9daaed
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-07 07:21:24 +00:00
hjk
7de7eb6bca Debugger: Work on WatchModel performance
Don't instantiate repeating boilerplate item data in some
cases (such as large arrays).

This makes it necessary to access parent WatchItems in
a lot more cases than before and needs another separation of
WatchItem/WatchModel code to keep the dumper autotests
in a functional state.

For a plain std::vector<int> with 1 mio items this reduces
 extraction time from more than 2 minutes to about 3 seconds.

Change-Id: I175c5f6ee90434a6e85342d8bb71bd10a04dd271
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-01-06 09:59:11 +00:00
Orgad Shaneh
4f95c5d607 Debugger: Replace newline with space in status message
Just removing newlines produces strange messages like:
"Cannot access memory at 0x1a2a3948Continuing nevertheless"

Change-Id: Ifca25bc14f4c10fc560066172f555a6f475af375
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-05 15:32:55 +00:00
hjk
8e702387e5 Debugger: Start separating different process environments
Debugger and stub run locally, the debugged process not necessarily.

Change-Id: Ibf6aec3dcaec60069866ec0765ec2178ca0a26d6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-04 12:33:47 +00:00
Eike Ziller
ff60bf37c9 Merge remote-tracking branch 'origin/3.6'
Change-Id: I8223551aec66539dd8c55262e5000c1621410334
2015-12-15 12:21:58 +01:00
Orgad Shaneh
d7f255bbd7 Debugger: Activate debug mode when loading is done
When Creator is executed with -debug (core or executable) and a project, the
core dump is opened, but the mode is switched to Edit when the project opens,
while the user expects debug mode.

Switch to debug mode when loading is done.

Change-Id: I2a6b18c9ff90605840fc53a6b23dee1e8d4d4e2c
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-15 10:54:52 +00:00
Eike Ziller
250798ed92 Fix visibility of floating debug windows
When auto-switching the mode back to the previous mode
after debugging finishes, floating debug windows
were in a funny state, if at the same time Qt Creator
was (re-)activated as the previous application by the
window manager. Work around that by doing the switch
asynchronously.

Task-number: QTCREATORBUG-14689
Change-Id: Iec1246854843f523b29003b1997466926ea02402
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-09 14:57:48 +00:00
hjk
33651877d8 Move QmlConsole to Debugger
Now it is closer to its only user and possibly reusable for no-QML uses
there.  We also drop the QML/JS syntax checker. The application being
debugged can already tell us about syntax errors. There is no need to
duplicate that functionality.

Change-Id: I2ba151f9f4c854c6119ba5462c21be40bddcebf9
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-12-09 12:06:26 +00:00
Alessandro Portale
37c1823974 Flat and themeable side bar icons
This patch adds flat side bar icons according to
http://blog.qt.io/blog/author/didesous/

The flat icons are supposed to be opt-in, via the theme flag
"FlatSideBarIcons=true". It is false by default for the default
theme for now.

Change-Id: I1cbe69d4e138d5d23c0172a374933ac7a4ce8a5b
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-12-03 11:30:50 +00:00
Tobias Hunger
71b4ce6673 Qt: Remove platformName and platformDisplayName methods
Fix fallout of this in KitInformation/Kit/KitManager and the wizards.

Change-Id: I5cb88cc381dc04409401909b810940ab6dccf86a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-02 14:49:29 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00
Eike Ziller
81e9b96148 Merge remote-tracking branch 'origin/3.6'
Change-Id: Ic7cba72e7bec10e4fc0099b97e3317e391a6aa5d
2015-11-03 13:06:35 +01:00
hjk
b1ad8b764d Debugger: Use some Qt5 connects
Change-Id: I03c301ae71c3747afc5d17a6f7689620e46fde62
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-02 08:54:07 +00:00
Alessandro Portale
b8bdc6f669 Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch replaces many of the existing toolbar icons
with recolorizable masks for better theming support.

Change-Id: I557aa485205fe2624f33724226f698c303342b40
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-10-23 16:04:52 +00:00
hjk
525c33f999 Debugger: Infrastructure for reworked native mixed debugging
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
  from actual reponse handling

New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.

Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-09 05:19:45 +00:00
hjk
1f380798b6 Debugger: Allow terminals for sessions started from command line
Change-Id: I43751fa90e54cd1d93b97822568d21c90118fb23
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-04 10:05:51 +00:00
hjk
129ea2119f Debugger: Pass system environment to sessions started on command line
Processes started with 'qtcreator -debug binary' got an empty
environment at startup, including no DISPLAY etc.

Change-Id: I0c574a3fa25faf18ddf10a6448b0b82c4f04f751
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-04 10:05:11 +00:00