Commit Graph

361 Commits

Author SHA1 Message Date
hjk
b8ae9fd46d Debugger: Adjust native mixed debugging after upstream changes
Change-Id: I4d137fadd0de2aa346f2f49932faac4ee9ed41e7
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-19 12:40:29 +00:00
hjk
ec2e01faec Debugger: Make basic native-mixed debugging work with LLDB
Change-Id: I4d55c6a486d5adbccaa93eaa1ee461238fecfea3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-13 06:49:00 +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
3ee97ef8ab Debugger: Use the usual callback mechanism for LLDB, too
... instead of the custom mechanisms to funnel breakpoint ids, cookies
and similar through individual bridge functions.

Change-Id: I2b6e906078eefdbcd4ffa166dc1881a1d0f7fb51
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-11 07:58:02 +00:00
hjk
dd7eff0371 Debugger: Add more roundtrip markers to LLDB protocol output
Change-Id: If2e3fc51dab800a9e347da7975eb89547acfb945
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-09-07 10:43:48 +00:00
hjk
5829b22b03 Debugger: Also show instruction bytes in LLDB disassembler
Change-Id: I9676e458153b745fc75a5da271524e73959fba03
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-31 11:51:19 +00:00
hjk
d16aed4304 Debugger: Add display of mixed disassembler output for LLDB
Change-Id: I4997ce4fb4ce6a61cca67e36abb84c61a1c120f5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-28 13:44:49 +00:00
hjk
47c79a102f Debugger: Fix handling of large registers with LLDB
Change-Id: I12a7a9e43922291c6bff77be5fefea4db6cb5482
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-28 11:11:22 +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
hjk
427c32ccb0 Debugger: Fix Jump To Address in LLDB disassembler on Linux
lldb.thread.RunToAddress does not seem to hit anything on Linux.
Fake it by setting a temporary breakpoint + continue.

Change-Id: I533c8fb42c9a3d1ac1e5cc23eae8162a3455fb9a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-10 14:04:48 +00:00
hjk
9130cdfc05 Debugger: Use special values for translatable strings
... when passing data from the dumpers to the GUI. This reduces
the need to guess whether a value contains a translatable string.

Change-Id: I5e2210b8d028bd71f0087a2ba5c7c5b04331b882
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-21 10:59:51 +00:00
hjk
e2b0641f28 Debugger: Adjust tests after change to member sort order
Change-Id: Iff3b9781ad9842b325d346a77514aa7a935d4570
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-07 14:12:28 +00:00
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