Commit Graph

426 Commits

Author SHA1 Message Date
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
Orgad Shaneh
edb55e1f66 Debugger: Suppress qWarning for debug messages
The following message was observed when debug session is done:

  Warning: STUB EXITED EXPECTEDLY (no active run control)

Change-Id: I21778dd70659a0fe4105c386e1e1693a8b81ac05
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-25 07:48:00 +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
Ulf Hermann
1d7243e724 Qml Debugger: Support "evaluate" while engine is running
Newer versions of Qt can evaluate expressions without pausing the
QML engine. We can take advantage of that. At the same time we can
remove the crutch of using QQmlEngineDebugService for this. The
latter produces inconsistent and generally worse results than the V4
debug service.

Task-number: QTCREATORBUG-14931
Change-Id: Ic78d08a0b00cf7de3911b7b672ce229c6d779363
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-08 09:29:41 +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
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
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
hjk
2b16b97f19 Debugger: Make DebuggerEngine::runCommand() virtual.
Allows default implementation of e.g. stack retrieval in the base
class.

Change-Id: I96460b19aa31347b2c863736b4ce2b5046eb4de6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-11-04 11:48:05 +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
1cb811ebe6 Debugger: Slim down CHECK_STATE() expansion
Less generated code.

Change-Id: Iafcafc875afa3ead12e10fd5f316d9663b2f9823
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-09-15 05:55:29 +00:00
hjk
2f819ec841 Debugger: Don't overwrite an empty env with an empty env
Needless no-op.

Change-Id: I219c6703a01269f9a95b74b4da34b362cd92f64f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-04 10:05:35 +00:00
hjk
cfb2b2186e Debugger: Fix removal of breakpoint marks in disassembler view
Task-number: QTCREATORBUG-14973
Change-Id: I6dfceefe6d8b1404c2a553dbeebd7dccefa1a624
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-01 08:16:53 +00:00
hjk
afa6bb9dd8 Debugger: Make (sub-)registers editable
Change-Id: Ibca2808513b6784b65d5c7223717a8b1d930c381
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-08-28 11:04:12 +00:00
Ulf Hermann
b5717a5315 QmlJS: Lazy-load console items to allow for recursion
Using Utils:TreeView automatically gives us the capability for loading
item as they are expanded. This way we can show recursive structure in
the console as well as load data from the debug server on demand.

Also, properly print error messages received from unsuccessful
command evaluations.

Task-number: QTCREATORBUG-14931
Change-Id: I66d440eedd9723b04670169b27db1ee18f3f2891
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-08-25 14:42:22 +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
a373698b10 Debugger: Remove breakpoint mark from assembler view
... after deletion. The breakpoint itself was actually removed from
the breakpoint view but the red blob stayed until the next update
(e.g. after the next 'step')

Change-Id: I120059a6e643df7c104a8f6d96e09b9c707d14d8
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-07-21 14:08:24 +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
hjk
6c9c79d058 Debugger: Make LocationMark draggable
Issue a DebuggerEngine::executeJumpToLine() in response.

Change-Id: I7be5738241ce91f61002d6f6b49c796824569024
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 09:17:22 +00:00
hjk
63c5fc034b Debugger: Split updateWatchData() paths
There are two cases that do not coincide in asynchronous
engines such as the QmlEngine: Inserting a new watch item,
and expanding the children of an existing item.

Change-Id: Ic98a5f1e89aca37146039a241de737c407606e83
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-16 08:05:36 +00:00
hjk
d48ac14fba Debugger: Simplify removal of outdated L&E items
This removes the need of bookkeeping on the engine side. It's
basically a kind of mark-and-sweep: On update begin mark items
that are expected to change as outdated, while data arrives, undo
that marking, and update end remove all remaining marked items.

Change-Id: I739b84869033d511d5c9a80605c079e87ef4f6a7
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-07-07 08:08:08 +00:00
hjk
f46d3d73e8 Debugger: Remove two soft asserts
One can be triggered by regular operation, the other one is
effectively checked by the compiler.

Change-Id: I82613bbba26ccc947c2745dbde11e7ac89c1a468
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-02 08:39:35 +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
hjk
d769efe1e2 Debugger: Move watchHandler()->notifyUpdateStarted() to doUpdateLocals
This was it also gets triggered when expanding tooltips.

Change-Id: I90ad39e9e82abdcd40e663b4ba4998205563009b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-17 06:31:53 +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
Benjamin Zeller
0c6bc58e8d Debugger: Provide a way for plugins to init a local DebuggerRunControl
In order for plugins to create their own local DebuggerRunControl
without the need to copy lots of code, the
fillParametersFromRunConfiguration is introduced and exported.

Change-Id: I50edc3f6f048a9f34e358b4104ef75c94c74dbb8
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Benjamin Zeller <benjamin.zeller@canonical.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-15 06:35:23 +00:00
hjk
5309e217e4 Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.

Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.

Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 07:40:27 +00:00
hjk
03212d6e49 Debugger: Use Utils::QtcProcess instead of GdbProcess
The original use case of running GDB itself remotely
is not present anymore.

Change-Id: I283a27216d6a8849fea7d9ca8df6b94571fb99fd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 09:04:33 +00:00
hjk
ad51a43c73 Debugger: More Debugger{Start,Run}Parameter separation
Fixes also the recent regression due to slicing when attaching
to a running application.

Change-Id: I6a7712811d6820b0c57658db10c5ff9790b4a338
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-09 08:16:56 +00:00
hjk
244cdb7804 Debugger: Split off runtime-only items from DebuggerStartParameters
Right now, DebuggerStartParameter is part of the debugger plugin
external interface. Better not make it fatter than necessary.

Change-Id: I3b9205089f971dd314ccba1335b5ca2d4d9fe7c6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-05-28 08:54:48 +00:00
hjk
4dfb56bb10 Debugger: Directly tell memory agents about finishing
Change-Id: I79a718f45835a709daa37dd785ed718c3743d77e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-05-22 06:10:01 +00:00
David Schulz
ab2a0d74de TextEditor: Sort text marks in categories.
Also adding a color for each category.

Change-Id: I3627d13913951a95804b5a816f087a822c01bd86
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-05-21 08:23:16 +00:00
Daniel Teske
7bc1af275d Debugger/Android: Add the Qt's qml directory as a search path
Change-Id: I5244eda989220aa2e2f8a225294d3c1dd0d97a2a
Task-number: QTCREATORBUG-13245
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-24 09:49:04 +00:00
hjk
2b19081cb0 TreeModel: More API cleanup
- introduce topLevelItemCount (similar to QTreeWidget)
- squash untypedTreeLevelItems()
- rename removeItems() to clear()
- rename removeItem() to takeItem()
- rename treeLevelItems<> to itemsAtLevel<>

Change-Id: I0f1bb4110f7687b20da3d92e3d943858645a9fa2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-22 13:48:18 +00:00
Christian Stenger
3dc6510d34 Android: Debugger: Avoid warning regarding release build
This is just a workaround to avoid the warning of having a release
build although building debug. In practice the validation should
be done on the main library instead of the app_process of an
Android executable.

Change-Id: I4fe4ccc790d9e373a11f851c8216362188a97b85
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-31 07:35:22 +00:00
hjk
00199039e7 Debugger: Fix display of expandable items in GDB and LLDB
Move common code to dumper.py and debuggerengine.cpp and
fix it there.

Change-Id: I20d91d1aa7400fbdb27938c10cf40c8f6019df0a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-26 15:00:23 +00:00
hjk
b3f88df41d Debugger: Remove most remaining occurrences of WatchData
... in WatchHandler and DebuggerEngine interface.
Adjust using code.

Change-Id: I6371f3e96ba46a783e23a5767cdde24a10d3fce7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-20 08:36:57 +00:00
Leena Miettinen
2bf6152495 Debugger: fix UI text capitalization and punctuation
Added full stops to ends of messages.
Used book-style capitalization for message box titles.
Wrote "operating system" in lower case.

Change-Id: I8cee1a1c7f4ae55952daa507395845feae203ab9
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-16 15:15:24 +00:00
hjk
46fcfa9018 Debugger: Remove widget argument from tooltip request
The only information ever used is whether it's c++ or not.

Change-Id: I4ca00663856dd66cbdf58c468f175a8c9e41d6a5
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:57:53 +00:00
hjk
34c807a11a Debugger: Remove WatchUpdateFlags
Only needed in the non-Python days. CDB didn't use it to start with.

Change-Id: Ia609218cc1a694f797e278c4d99ead68e6212938
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 13:55:55 +00:00
hjk
68807bdde1 Debugger: Avoid some undesired state transitions on shutdown
Seeing an ill engine while trying to stop means that the stop failed.
Also, a finished master engine doesn't need further updates.

Task-number: QTCREATORBUG-14089
Change-Id: Icd5b090dfcdc0875953d8756a909b1405e05f71f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-05 14:40:48 +00:00
hjk
39f904957a Debugger: Merge GDB/LLDB process error handling
This also removes some of the "illegal" state transitions,
partially addressing QTCREATORBUG-14089.

Change-Id: I817d87a0b5e0a40285bc9b0880fef5bceaee3f16
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-05 11:55:37 +00:00
Friedemann Kleint
54da18eaaa Clean exported headers of the Core plugin.
Change-Id: I26472d568844d5fee62323e01f5c5c12082d5450
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 07:18:14 +00:00
hjk
eb44cfc00a Debugger: Fix loading of Linux core files with LLDB
Change-Id: I76183591c5242589c25d8e5695367d61b6cc5afc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-27 12:27:20 +00:00
hjk
a21afdd2a0 Debugger: State machine cosmetics
Remove one unused notification, rename notifyInferiorUnrunnable.

Change-Id: I585d3a8606585fbdd8ad48e5eeecf629542bd93c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-27 07:36:46 +00:00
Friedemann Kleint
143af2845d Fix excessive warnings by MSVC 2013 64bit about size_t->int truncation
C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data

Change-Id: I91979c685bbbd84359f7f4e19911a21a408f5d23
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-20 14:27:51 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
hjk
f1c5889e77 Debugger: Some code modernization
Qt 5 signal/slot, a few auto.

Change-Id: Ia17f1b3dcd41dfe0a373c14e7c1d34d210d084f1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 15:14:55 +00:00
hjk
e4de40127f Debugger: Enable 'native mixed' toogling also for LLDB
Change-Id: I50a026d6af2874aa78db98b0df1fcbe233c88b1b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-05 13:22:37 +00:00
Orgad Shaneh
4e8e75d88e Debugger: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I1aa1a2b6ccbafeb1a8f3053fffa39b3f96992591
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 08:52:39 +00:00
hjk
3c8a8eb8e8 Debugger: Introduce a pty based channel to inferiors
This is experimental for now and requires QTC_USE_PTY=1
in the environment to be used.

Change-Id: I460ce7b9283467d481e903f731f4243b7e5ec094
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-26 09:43:19 +01:00