Commit Graph

199 Commits

Author SHA1 Message Date
hjk
84d06d0ec6 Debugger: Remove LLDB's Dumper.defaultValue
This was needed with earlier, now unsupported versions of LLDB to
provide a target context for evaluation of expressions.

Not needed anymore since SBTarget.EvaluateExpression() exists now.

Change-Id: I31871937832439dbd98b763ac77eab4db56ef2ee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-06 06:04:27 +00:00
hjk
565df2cb06 Debugger: Remove warning on variables without names
They can appear for unnamed function parameters with default values,
e.g. void foo(int = 0).

Change-Id: I02cad093247f4508e7d4c4fd3f143c9ad8d5ebd1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-06 06:04:17 +00:00
hjk
fdde69a5a5 Debugger: Add dumper for various QJson* classes
Needed to debug the QmlDebugger.

Change-Id: Ia0b50dac2146fcc81990b78eb8de30c8e763bba2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-02 06:58:04 +00:00
hjk
7c8d20ded7 Debugger: Pass request to sort struct members to {gdb,lldb}bridge.py
The request will be honored when creating the values
instead of re-sorting in the frontend.

Change-Id: I0ea13bd9b0700a4d2ae4f0b355c56ddd37557398
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-11 08:40:51 +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
Jack Andersen
39df03aba7 Debugger: LLDB strictly requires bool values for breakpoint API
Change-Id: Ia4b3cfb2ef41df8c76800eb4da597f7cb5f770c4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-27 09:04:50 +00:00
hjk
c5ac8fc21b Debugger: Use simpler construction of basic types in LLDB dumper
Cheaper, more robust.

Change-Id: I989853dc288864f4088f09f60c8c5b717e4faef0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-08 10:35:08 +00:00
hjk
e855de4037 Debugger: Fix GDB hanging
This partially reverts commit e33da6a6b3.
GDB seems to hang while executing str(some_pointer) in some setups.

Task-number: QTCREATORBUG-14374
Change-Id: Ia678533b9122e505b21ef6659d404239995ddb81
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-05-06 06:19:00 +00:00
hjk
fc23148202 Debugger: Make access to non-existing member throw with LLDB
This mimics GDB behavior.

Change-Id: I929a87ff227e4af7cfbfbbcd2a8e72c9999e9338
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-14 12:39:20 +00:00
hjk
dcf3ba5009 Debugger: Explicitly report chars as integer values with LLDB
This brings it into line with GDB output and is needed in
the frontend to provide normal integral value base changes.

Change-Id: I17adc7730419648d45c0d5866311de33bf01a7f0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-14 11:09:06 +00:00
hjk
c9cce0b541 Debugger: Simplify LLDB test loop handling
We know that we expect a frame with valid debug info.

Change-Id: I51079ca4db87df05c93464fd46e5add1f756cba7
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-14 09:41:10 +00:00
hjk
315585056b Debugger: Properly retrieve signed internal values with LLDB
Fixes the QLinkedList dumper.

Change-Id: I1be509c16ed96edb02c540d9c87b9506e496ed2c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-14 05:59:55 +00:00
hjk
53e2f9b428 Debugger: Use a dummy name for temporary SBValues
Unlike SBValue.CreateValueFromAddress, SBTarget.CreateValueFromAddress
does not seem to like None as name. '@' gets accepted, though,
and is unlikely to appear as real C++ identifier.

Change-Id: I74f6d218f73222af3308d2acb5fbe9ff0a0f6c4b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-14 05:55:28 +00:00
hjk
c24640bae1 Debugger: Use SBTarget.CreateValueFromAddress instead of SBValue
SBTarget.CreateValueFromAddress was not supported by older
versions of LLDB. Unfortunately, we still can't use
SBTarget.CreateValueFromExpression.

Change-Id: I982021531a2ab070aa279dd17e9714f86efe83cc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-13 13:26:19 +00:00
hjk
bfac365ebb Debugger: Fix parameter passing to LLDB dumper tests
Change-Id: Iae342ffe68385de877c7a1e9a7e61e7d4889f731
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-02 14:56:32 +00:00
Christian Stenger
4deadb5f8b Dumper: Test: Fix execution of dumper tests for LLDB
Change-Id: Id4f437fe17d7989c15ad223c20605773411a1142
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-02 13:57:27 +00:00
Christian Stenger
de8422acb6 Lldb: Don't trigger continuations when already shutting down
Task-number: QTCREATORBUG-14219
Change-Id: Ic4dc3bd3f429164f3e56a43dd2b20d409d69fa49
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-01 06:19:49 +00:00
hjk
cc469f6466 Debugger: Robustify extraction of integral values using LLDB
Change-Id: Ieabad21e5e00bef12eb51046235890840b5a77a1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-26 15:02:51 +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
939e5e3b19 Debugger: Fix stack display on interrupt with LLDB
Recent regression, stack data was only pulled when hitting
a breakpoint, not on interrupt.

Change-Id: I3de29fceadd4c5492f4edaffca7577dae7ae3d11
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-26 07:59:57 +00:00
hjk
48ac7c186b Debugger: Re-organize passing of display formats
The current setup (dumper->gui: list of descriptions,
gui->dumper: index in list) is fragile and not easily
i18n'able. Go with an enum based approach now.

Change-Id: Ie78c596065a8b2ba87ad725274da29d4be3a6da4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-23 14:12:43 +00:00
hjk
e8f8aaa263 Debugger: Fix dumper format choosing with GDB
... and further unify GDB and LLDB code paths.

Change-Id: Id89f3804c53190c4888082891fd3c3c55eceac84
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-19 06:59:01 +00:00
hjk
779f55ff37 Debugger: Report LLDB breakpoint address after resolving
Task-number: QTCREATORBUG-14086
Change-Id: I7dcdc62196671583505a2e011ed04fbdd3227de6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-16 10:32:20 +00:00
Christian Stenger
14a02d5081 Debugger: Tests: Fix execution of dumper tests on OSX
Change-Id: Ibe3e447d29e3834766ef067ba4424c3b08ba5eb1
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-10 08:55:14 +00:00
hjk
b981f5049d Debugger: Let LldbEngine pass current token to dumper
Change-Id: Ifea751354f637f67e640d36ba1baa95678c86ee9
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-06 08:43:37 +00:00
hjk
3ddbba1415 Debugger: Postpone location reporting in LLDB stops
... to the initial stack contents report. This helps to avoid unwanted
assembler reports in cases where we have to skip over "spurious"
stopped events.

Change-Id: I3340297ab01f976ab9d918fe73f69f4f32b12c03
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-04 13:01:06 +00:00
hjk
fb785895f2 Debugger: Make LldbEngine stack handling more similar to GdbEngine
This also addresses the remaining issues of QTCREATORBUG-13803.

Task-number: QTCREATORBUG-13803
Change-Id: Iceb123279236d98961d15fe7421acc7c10d1b1c7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-03-03 10:21:25 +00:00
hjk
0ef651240d Debugger: Ignore first stop for LLDB/Terminal
Change-Id: I16c24fb4072ce4d63fdbfc57618daa2a48fa1d80
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-27 16:53:24 +00:00
hjk
2ffe50c208 Debugger: Fix stack view update after switching threads with LLDB
Change-Id: I8e870a44e07dd069db5f61ae6ffd75c517e2d445
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-27 14:52:14 +00:00
hjk
672ab5c8d8 Debugger: Rely less on implicit state in lldbbridge.
Ideally, all 'current' data should be passed down from the engine.

Change-Id: Ibfe7c466ec564c6907398ec2ec6c05d04e6670d6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-27 14:42:55 +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
6b0d5d6036 Debugger: Clearly mark unavailable register contents
The previous display as 0, or 0x0...0e (LLDB on Linux) was
less useful.

Change-Id: I820ea5ef427b65633471c7c62e44851fcfd637cd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-26 13:56:51 +00:00
hjk
0697c6d89a Debugger: Fix array access with LLDB if index is a long
Triggered with the QGraphicsPolygonItem dumper on Linux.

Change-Id: I1374ca308c732eb5c25da959d8b499515ed72e66
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-26 07:48:42 +00:00
hjk
2ee4363d1d Debugger: Force LLDB round trip between stack and locals update
The stack might produce data (such as as the QML context in
native mixed debugging) that is needed for locals display.
While this doesn't work yet with LLDB anyway, the change
suppresses one soft access when accessing the top frame of
an empty stack (the usual case on the first update).

Change-Id: If931fbe940b8cda01cc6cc34429a2fcb33cd8d19
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-24 14:31:32 +00:00
hjk
3a7a1c2164 Debugger: Make some LLDB warning not break output format
Dumper.warn() tries to interleave the message with an
ongoing report, whereas the global warn prints directly,
possibly breaking the report parsing.

Change-Id: If753773d5eedf98a489f155d46d2911e04059461
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-24 13:27:23 +00:00
hjk
4198cc1441 Debugger: Don't re-check pending LLDB breakpoints
This partially reverts change 1d1695c2.

This doesn't seem to be needed with recent versions of LLDB anymore
and removes one source of "spurious" breakpoint-changed events.

Change-Id: I8140944a46bbc83173c0088117a88110b0872e8a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-24 09:55:35 +00:00
hjk
a081fee8f5 Debugger: Cleanup lldbbridge.py
Move reusable Breakpoint enum to base, use 'theDumper' uniformly
across backends as name for the Dumper singleton. Signal
engine setup only if the Dumper successfully initializes.

Change-Id: If1b6be9d054f249d0d46061e4949cbecf4fd09cb
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-13 09:55:35 +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
f91cc66f9a Debugger: Combine some watch related GDB and LLDB code paths
Change-Id: I20e5f6f04418c931354a07bc3597f6982fcaf942
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 12:49:21 +00:00
hjk
875d889082 Debugger: Move bbsetup over to runCommand()
Change-Id: I0a19b28d24cb570651ea84bf7cdbc9a761f85a0b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-12 07:19:48 +00:00
hjk
e76c4839bb Debugger: Consolidate some GDB-through-Python interaction
Instead of calling a GDB extension command invoking a function
on the well-known Dumper instance, call the Dumper function
directly. This also makes the code more similar to the LLDB side.

Change-Id: I4b23177eb72a904721b63c578ce7fbfe204f02a2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-11 15:00:35 +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
hjk
a20a7d099b Debugger: Move QML stack access to DumperBase
... and make it work with LLDB.

Change-Id: Idaec029942dbcc726931781caff830173f7b126a
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-05 10:55:55 +00:00
hjk
96a0f48093 Debugger: Pass all breakpoint properties to *brigde.py
Change-Id: I58ee1b106e1cd6e8ad5ce99b226860c528698520
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 15:32:20 +00:00
hjk
7b462aa0bc Debugger: Startup fixes for LLDB
On Mac, don't ignore the 'attach' stop, as it causes trouble
in the Terminal case. So a terminal start needs extra
'continues' but doesn't crash LLDB anymore.

Change-Id: Iaa72e3f5cfc02d8cd1841fa57e0633109645da31
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-04 14:20:27 +00:00
hjk
b197566eec Debugger: Improve LLDB state reporting
Change-Id: I652755c09e99f9a5d9607b49850ea3350193d086
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 13:19:27 +00:00
hjk
d4a32fd6b3 Debugger: Implement native mixed breakpoints with LLDB
Breakpoints are hit, stack frames are identified as JS or native.
No further data yet.

Change-Id: I84a02422fd36dc7645003114dd8519bedd913c06
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 12:46:02 +00:00
hjk
3a9b34f232 Debugger: Re-use base infrastructure for LLDB breakpoint handling
Change-Id: If32b1f421e45dc4ee446e193e03c959d7c700948
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 08:50:19 +00:00
Eike Ziller
7005d791c3 LLDB: Fix that locals didn't show up anymore
Broke with aa39916c41
It was missing a @ marker to separate mirrored messages from actual
data.

Change-Id: Ie142055181de4fada15060108a6ba2166591012e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-02 14:35:48 +00:00
hjk
aa39916c41 Debugger: Invert LLDB/Python startup order
Instead of starting LLDB through a Python script this now starts
LLDB directly. This did not work a while ago but seems fine nowaday.

Change-Id: I20e915070cd6addf260817c311f4160d010aa861
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-30 15:35:20 +00:00