Commit Graph

159 Commits

Author SHA1 Message Date
hjk
d01a5ff2aa Debugger: Speed up display of large static arrays with simple data
This addresses QTCREATORBUG-15426 for the case of well-known simple
types (int, float, ...). Retrieving 1 mio ints takes now ~15s instead
of ~140s.

Task-number: QTCREATORBUG-15426
Change-Id: Ifb7c957d60504e23147d499d8bb9bbd41c5a53ba
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-10 11:23:24 +00:00
hjk
4099cef35d Debugger: Better fallback for resolving function local struct types
Function-local struct definitions produces types 'names' like
'QList<main(int, char**)::SomeStruct>'. Remove the part up to
the '::' and rely on local lookup.

Task-number: QTCREATORBUG-15400
Change-Id: Ic73005f294c5f62c504b2d7ded4dd2716d88f2e4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-09 07:37:03 +00:00
Orgad Shaneh
01b50d2fc3 Fix invalid long address printing
Task-number: QTCREATORBUG-15326
Change-Id: I90b73e757c0ad3fc16ef587e6b4359e6bcb843ea
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-20 07:51:14 +00:00
hjk
e6454be43f Debugger: Fix QObject dynamic property dumper for Qt 5.7
Property values are stored now using a QVector, not a QList.

Change-Id: Ifc8d6b856d2aff5ce4565c43111132f2a73460df
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 13:49:34 +00:00
hjk
f81dca4b38 Debugger: Relax reference counter sanity check
With C++11 we use std::atomic in the ref counter, giving yet
another possibility of structure member names. Instead of
trying to keep up with that, access the binary data directly.

Change-Id: Iabea831689f58f83150287218bb015c824e888ca
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 08:44:58 +00:00
hjk
626086e9d1 Debugger: Fix expansion of std::string et al
The objects have been reported as 'having children', but
when asked for them nothing was produced, leading to an
endless loop (until the next 'step' command).

Change-Id: I3bbfe10a7ed980b27a5fca1edfe44dd8983b8f7b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-09 08:02:32 +00:00
hjk
7a618c38cf Debugger: Remove unused dumper.py function polishWatcher()
Change-Id: Ib85ac34b56971b1882d91bddf9abf1af5b0506f4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-11-02 10:00:49 +00:00
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
a7dd2ed4ce Debugger: Reduce scope of usage of Python's importlib module
The module doesn't exist in Python 2.6, so we can't use it
unconditionally if 2.6 is to be supported again.

Task-number: QTCREATORBUG-15076
Change-Id: Ic91cdf451ce846d892cd914bf850a4fd4b18c488
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-24 06:43:01 +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
Eike Ziller
8eaaef96aa Merge remote-tracking branch 'origin/3.5'
Change-Id: I65968dd02ea6bdd15f304ae567dd0c02238e6949
2015-08-20 13:23:13 +02:00
hjk
76b5095687 Debugger: Also display subentries for pretty printed char arrays
While the formatted value is usually all that's wanted,
having access to the individual chars is handy at times.

Change-Id: I53b0d0ccfe4289b9b54a1caced4e0bd5ac66d9fc
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-13 14:18:22 +00:00
hjk
ef7a7a445b Debugger: Fix evaluated expressions containing quotes
Task-number: QTCREATORBUG-14364
Change-Id: Ia1fc1f341dad56c495b356464951a771dfccc50b
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-13 12:19:17 +00:00
hjk
eca5ccdd3e Debugger: Debugger protocol maintenance
- Move DisplayFormat from watchhandler.h to debuggerprotocol.h
- Add/update a few comments about the use of the protocol enums
- Make decodeData take a DebuggerEncoding instead of an int

Change-Id: I50bed70a5da2e94da46e894bf9136bc14c9a1b23
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-12 12:59:41 +00:00
hjk
d7c5ee7edd Debugger: Fix display selection of char arrays
... by re-using the logic we had for std::string already.

A plain char[] value did not react to Change Display Format,
Latin1 was used unconditionally.

Also rename putStdStringHelper to putCharArrayHelper.

Change-Id: I01fdf796ff49a4c99ead7b9b46274684e18e962b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-12 08:07:08 +00:00
hjk
3413130379 Debugger: Fix typo when reporting large containers
Regression since 9130cdfc05, leading to "<unavailable>"
instead of "<at least %1 items>"

Change-Id: I89166e50f27c568009ff7aeabb5adf622e303789
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-08-11 09:31:54 +00:00
hjk
eaec337265 Debugger: Fix display of C-style wchar_t strings
The null delimiter was not reliably found due to iterating over the
wrong positions in the string.

Task-number: QTCREATORBUG-14826
Change-Id: I3a3f2fca84648b54b12fe5fae921ce6311d4f1b2
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-10 14:28:44 +00:00
hjk
5f9f95a451 Debugger: Work around wrongly reported array size
GCC 4.9.1 + GDB 7.8 (and likely more combinations) produce
sizeof(QProcess[3]) == 0, making the dumpers report no child
entries for the array.

To work around, try to parse the array size from the type name itself.

Task-number: QTCREATORBUG-14755
Change-Id: I1f17d5d6fde6bc5fe66d2ad4a73f77185503f9ab
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-22 13:27:19 +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
6d8dfe03de Debugger: Move typeCache from DumperBase to (Gdb)Dumper
It's an implementation detail of the gdb side (and would not
be there if gdb.lookup_type were faster)

Change-Id: I135c32a1c9132ab771c8fab5abfd04fbb308891e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-10 10:45:33 +00:00
hjk
6f58f4ba50 Debugger: Basic type display switching for QVariantMap items
This is not a complete solution (that would need to pass information
on typedefs and artificial types like "QVariant (QVariantMap)"
between dumper and gui, but allows switching to compact display
for individual items.

Change-Id: I47d15356e5decf9411af4acc8fa7a0f0cfbd045f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-10 10:45:27 +00:00
hjk
c4b9af6841 Debugger: Fix typo in comment
Change-Id: I0bea97b8f452c250135a5cf7a364665ddbd24df2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-08 06:38:38 +00:00
Eike Ziller
4058ff6fe9 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/libs/extensionsystem/pluginview.cpp

Change-Id: I410156c1003d5dc81e915110c6d432bcd71da010
2015-05-07 14:42:46 +02: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
Eike Ziller
50fe3585a8 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/libs/timeline/qml/MainView.qml
	src/plugins/git/gitclient.cpp

Change-Id: I0b6ec7b9a592014deb0dd2e1145b19dd6753b1c3
2015-04-15 17:45:47 +02:00
hjk
6965fc30b1 Debugger: Disable parts of QDate* dumper for GDB on 32 bit
Older versions of GDB (~GDB 7.4 on 32 bit) will cause segmentation
faults in inferior calls due to misaligned %ebx values in an SSE
call in qstring.cpp:findChar.

Change-Id: I44492106080f12e645f9d57828438ec70fd66ca6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-15 11:07:30 +00:00
hjk
f7d794dc9d Debugger: Next attempt at robust array dumping
In the fallback case now really go back to explicit object-at-address
construction. LLDB on Linux doesn't seem to like implicit pointer
arithmetics.

Change-Id: I3be6b0b21b35b9b9141440d4a11e9e889bb2f4bb
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-14 09:41:26 +00:00
hjk
e33da6a6b3 Debugger: Remove GDB specific access test in generic pointer code
The field checked for does not even exists in lldb.SBValue.

Change-Id: I062ccf62da2e2ea3f011d0b841cba0e87f7c6fa9
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-14 05:55:15 +00:00
hjk
afcf2afe5a Debugger: Rename local 'bytes' to 'rawBytes' variable in dumper
'bytes' has special meaning in Python.

Change-Id: I9ff7c56488c9d29e42b2c7a12e40b45815be2a76
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-13 12:40:42 +00:00
hjk
d15e4ff2c9 Debugger: Replace block access to array data by plain loop.
This makes the GccExtension dumper test pass with GDB

Change-Id: Ia1319e878416bea8b162a1a9eef1271cb7bebc63
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-08 05:31:27 +00:00
hjk
3658bdac89 Debugger: Use primitive internal widget instead of matplotview
This practically removes any functionality beyond plain plot display,
but does that at least reliably, cross-platform, without dependency
on 3rd party python packages.

Change-Id: Iaff2f78595394522f32264c642df20dd48b83f8b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-02 12:25:04 +00:00
hjk
d66e063165 Debugger: Make C array data plottable
Change-Id: Ib4519f0e64504ec0e3dccd89978acca5134b2932
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-01 09:09:43 +00:00
hjk
5dcd9fe694 Debugger: Change plot display of array data to use lines between dots
Change-Id: I6d2cf5ca7d3f4a404a3c112a140aeae067cb3b6d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-30 11:29:02 +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
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
90c9093a49 Debugger: Make display encoding of std::string selectable
Task-number: QTCREATORBUG-14119
Change-Id: I17434490a1a0a8374ee0c178c45a032af283e7a5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-18 14:03:50 +00:00
hjk
6960da702a Debugger: Fix display of array base address
Change-Id: I858d38a1f52cd7247f1b57d686c3c065e5a0fb61
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-03-18 12:21:21 +00:00
hjk
3e02f8ec2e Debugger: Fix format switching for char[]
Task-number: QTCREATORBUG-14094
Change-Id: Iea1f59d5af2fb453ead7e0cef9e04293a698794e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-09 11:17:25 +00:00
hjk
9abfd712aa Debugger: Fix dumper reloading
Was broken after making the handler functions members.

Change-Id: If14cbad777323d48000641fb38a01eb59503d297
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-03 08:13:36 +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
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
fee7cbe55b Debugger: Move 'mixed native' variables extraction to DumperBase
In preparation for re-use through LLDB. Not yet functional there.

Change-Id: Ia924f1499a1bbaebf3dccbe15152f324058b1677
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-05 12:00:57 +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
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