Commit Graph

1186 Commits

Author SHA1 Message Date
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
Eike Ziller
3b1a966cc8 Merge remote-tracking branch 'origin/3.5'
Change-Id: Iebaabfc2f724cd493b7cab025406531cea5cd2dc
2015-09-01 12:57:51 +02:00
Daniel Teske
b82311024d Open Project: Don't show a error dialog for duplicated projects
Instead, switch to edit mode, show sidebar, scroll to project,
and show a tooltip next to the project.

The tooltip is somewhat easy to miss, but this is a clear improvement
in most cases.

Change-Id: Icd27f76e7d434f33e731b6fd56473ff913986a89
Task-number: QTCREATORBUG-8422
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-08-24 11:29:09 +00:00
hjk
9bd066cb94 Debugger: Always disable wait indicator when switching engines
The spinning wait indicator in the Locals view could go on infinitely
when the running debugger engine did not get a 'notifyUpdateFinished'
signal (e.g. if the engine quits between beginning and ending an update
cycle).

Change-Id: Ib3d7a88d3b89ed423b2d41e85a632ff01f91c155
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-08-24 10:21:32 +00:00
hjk
e863393355 Debugger: Suggest a non-empty name when saving scratch buffers
The user needs some clue what buffer is about to be saved,
even if this is not a real file name.

Task-number: QTCREATORBUG-14602
Change-Id: I7d81a50079d8aa1a3b2ba63130d54515667a6663
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
2015-07-22 13:41:01 +00:00
hjk
d765cd73a2 Debugger: Recognize source data within disassembler view
... and use it to toggle breakpoints by file and line,
and for jumping to file and line.

Task-number: QTCREATORBUG-14278
Change-Id: I799d085eb53339905ea3608022aeae5a9aef1fda
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-22 11:46:32 +00:00
hjk
e5f76153b9 Debugger: Fix use of server start script
... when using Debug->Start->Attach to Running Debug Server

Task-number: QTCREATORBUG-14747
Task-number: QTCREATORBUG-7459
Change-Id: I98c3d4f2d565d972369f2716ff2b72b4d3d04b2b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-21 09:35:45 +00:00
hjk
db80d20f30 Debugger: Restrict LocationMark dragging
... to engines that actually support JumpToLine and make it
work in disassembler views.

Change-Id: I10368ea719587caa7c4f33665eff57c2bf300d84
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-21 07:38:19 +00:00
BogDan Vatra
2182ded57b ProjectExplorer: Use Core::Id as RunMode "enum values"
This provides a way for third-party plugins to implement run
modes without the need to add a value to the central enum or
using manual workarounds like RunMode(*(int*)&someUniqueObject).

Instead of centrally defined enum values this uses Core::Id that could
be defined anywhere.

Change-Id: Ic350e3d8dbb8042c61b2d4ffec993ca151f53099
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-30 06:20:54 +00:00
hjk
1538dca81a Debugger: Continue DebuggerStartParameter cleanup
- Move sysRoot, debuggerCommand, targetAbi to DebuggerRunParameters,
  they are always the one coming from the kit.
- Move projectSource{Directory,Files} to DebuggerRunParameters,
  they are alway coming from the runConfiguration's project
- Pass RunConfiguration always as separate parameter, that's
  what related code does.

Change-Id: I9965a052237af53fa2d170701bc88b552cab12ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-06-26 18:14:57 +00:00
Daniel Teske
59b57518f3 DebuggerRunParameters: Remove remoteSourcesDir, [remote|local]MountPoint
Those variables are unused except for debugging output since more than
1 year.

ed1483741e

Change-Id: I052fd042901401641c784eb66ab017a8f31f844e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-26 12:37:27 +00:00
hjk
60a8442d8c Debugger: Rework start parameter completion.
It's again a linear process now, with explicit entrance point for
all users.

Task-number: QTCREATORBUG-14618
Change-Id: I96c08947270ce34d7bc6c8be1d7f350dbfa14794
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-25 12:13:35 +00:00
Jarek Kobus
684267179e Properly delete plugins dependent on failed plugin
Init all class member pointers to NULL.
This fixes possible crash on exit when dependent
plugin was not loaded (e.g. TextEditor was missing).
In this case plugin's constructor gets called,
initialize() method is _not_ called
and destructor gets called -> crash.

Properly delete dependent plugins on
a plugin which failed to initialize properly.

Fix labels of deleted plugins inside an error dialog
after pressing "Error Details" from "Installed Plugins"
dialog.

Change-Id: Iddc029a0f07dcba2501d734d142fb0e69e9383d3
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-17 17:00:56 +00:00
hjk
ad6451bbe4 Debugger: Remove the InferiorExited state
There are now several possible orders of events between sending a 'kill'
and receiving something that indicated a properly shut down inferior.
Coordinating the InferiorExited state during engine ramp down is not
worthwhile as that state had only a forced transition to InferiorShutdownOk
anyway. For the user (and user code), only the fact that ramp down is
finished is interesting.

Change-Id: Ic22131d5a1066dc62bd069f532c28b773f231088
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-17 06:26:24 +00:00
hjk
5c054dd24a Debugger: Use TreeModel for threads
In preparation of the introduction of thread groups.

Change-Id: Iadac9203eb4d60d0bc930113c2776e65352ed304
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-15 13:45:27 +00:00