Commit Graph

933 Commits

Author SHA1 Message Date
hjk
5b583ad67e Debugger: Add dumper for QUuid
Change-Id: I171ac0130009b9610c766deaa2d85aa095e33d6f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-09 06:54:01 +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
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
68a707458b Debugger: Remove workaround for older LLDB
... that breaks QHash display for keys with value 0.

Task-number: QTCREATORBUG-14451
Change-Id: I8578d9f1d14c367beaccabc5373bd75860ee454b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-07-07 13:44:54 +00:00
hjk
c691cca48d Debugger: Always sort base classes first when showing a structure
Simply relying on '[' < any_letter is not good enough in the
presence of uppercase identifiers.

Task-number: QTCREATORBUG-14637
Change-Id: Ib0e305c0b86f3b117c07de18cde00b14f424a7c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-06 08:56:11 +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
f886c70199 Debugger: Be more robust in case of unexpected non-ASCII output
Also correct typo in function name.

Task-number: QTCREATORBUG-14629
Change-Id: I193efc3a002f83b0091f93e087f2feb19dc4f5c1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-25 11:37:18 +00:00
hjk
60eacb7790 Debugger: Allow hex values to be passed for qmlcontext addresses
Change-Id: I327f40f872a2399befdbccf78e5b364ecaf86aee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-15 06:38:01 +00:00
Orgad Shaneh
ec3695be89 Dumper: Improve Token dumper
Show identifier/literal when available

Change-Id: I4fd623f802db7bce14f8887c5b3ba2fe6867f632
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-12 06:24:08 +00:00
Orgad Shaneh
5fe0682fa6 Dumper: Fix exception with Python3
Occurred when I tried to expand an object that contains 2
unnamed unions (CPlusPlus::Token)

	File "gdbbridge.py", line 1113, in putItem\n    self.putFields(value)\n'
	File "gdbbridge.py", line 1150, in putFields\n    fields.sort(key = lambda field:\n'
	'TypeError: unorderable types: str() < NoneType()\n'

Change-Id: Ica38750435ae851b52d87dc6fcc59118d3f1d8ee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-12 04:42:59 +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
Orgad Shaneh
237cfd1f77 Dumper: Add a dumper for CPlusPlus::Class
Change-Id: I619d31f307844349095c81defc675c57fcaa4de0
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-19 14:53:53 +00:00
Ray Donnelly
f5dcc93b7e Debugger: Handle case of os.path.sep being '/'
On MSYS2, if QtCreator is launched from one of the msys2 shells
then the MSYSTEM env. var is set and our Pythons set os.sep and
os.path.sep to '/' so that it aligns with the default separator
of those shells.

fromNativePath(str) then fails to convert '\' seprators embedded
in binaries since str.replace('/', '/') is a noop. The operation
we want here is to convert all '\' to '/' anyway so this is more
explicit regardless of any opinions on our choice to dynamically
vary os.sep and os.path.sep

Change-Id: I76c05b188abca41c6a1b516c68b584e0c06e7235
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-11 11:23:11 +00:00
hjk
5c58293a36 Debugger: Some Python 3 support for PdbEngine
Change-Id: I052bc093086a5da0b2cbd4e99df32e42627ceaf5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-08 10:50:34 +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
Orgad Shaneh
bba6515562 C++ Dumper: Fix potential endless loop on invalid pointer
Change-Id: I554f2cd0b97c549767453ad3df290d93da483360
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-05-07 12:46:02 +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
Orgad Shaneh
4752c809c9 C++ Dumper: Support int in template arguments
e.g. Temp<int>

Change-Id: I3d737a696396548a896685aa48fc99a1c3289a6c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-30 06:59:01 +00:00
Orgad Shaneh
3b0a75c9e0 Dumper: Fix internal dumpers with Python 3
Change-Id: Ic38a827ce32e17fc7038ea974e05c77959367342
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-27 06:17:20 +00:00
hjk
7697bd4b6f Debugger: Remove broken old LLDB QSet dumper workaround
Task-number: QTCREATORBUG-13153
Change-Id: Ifc1393a9bedd0be793d752ad6af85221f5f8d247
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-23 12:09:07 +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
89661af04e Debugger: Fix one call to check(False)
Not much harm done, the code was meant to raise an exception anyway...

Change-Id: I81db4081b4ca583e46a826aaee2fc8fa3f186a11
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-15 11:37:35 +00: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
c50286db3c Debugger: Remove workaround to get dynamic type in std::*_ptr
Seems to not be needed anymore with recent GCC, and makes the
LLDB test pass on Linux.

Change-Id: If793e726656df8b319d2f50e1986e0a92f68411d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-15 07:46:14 +00:00
hjk
c5de4fa358 Debugger: Adjust std::__1::unordered_map dumper
Implementation seems to have changed.

Change-Id: I196d02cddcccdd7765e5a098bb98f894122781a1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-15 05:53:22 +00:00
hjk
e452ebde97 Debugger: Fix std::unordered_{map,set} dumper for LLDB on Linux
Change-Id: Id96d02cddcccdd7765e5a098bb98f894122781a1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-15 05:53:12 +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
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
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
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
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
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
Eike Ziller
11590a8c5f Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.cpp

Change-Id: I09c5a047f7d91fecfc58c78df438afcdcdc0a8d7
2015-04-13 10:53:03 +02:00
hjk
1de861f06b Debugger: Make QFiniteStack plot work without requiring expansion
Consistent with QVector etc.

Change-Id: Id616c9003c0d561ec941f9961dee122059d75dc3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-13 06:55:11 +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
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
hjk
e6f73164c3 Debugger: Adjust QVariant2 dumper test
Take new QPolygon{,F} dumpers into account, also make QUrlPrivate
field accessible,

Change-Id: I2b5c122895c3ee389ba939eaeffcd613fa206009
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-02 14:07:24 +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
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
879bb9adcf Debugger: Remove comment on broken GDB 7.2
We require 7.5.1 now, so the case is uninteresting.

Change-Id: I40bf1c3d531b83998a45e7476ed48397b23b4ae6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-02 10:34:02 +00:00
Eike Ziller
fcc6b11230 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: Iaff42d30008db13ecb685e5157c82292fe48b038
2015-04-01 11:53:26 +02: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