Commit Graph

933 Commits

Author SHA1 Message Date
hjk
845feec543 Debugger: Fix QFixed dumper and add an auto test
Change-Id: I9895d1dec4a6db9fa93e6ca0d6d30bdd92a4c3c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-09-15 06:33:32 +00:00
Vikas Pachdha
1787d00e6e Continue process after lldb attach
lldb stops the process after attaching and the event loop is not yet started.
This makes the debugger wait for events while process is in stopped state

Task-number: QTCREATORBUG-15705
Change-Id: Iae6fe94fc483d963b377582c4cbbb443be5e6cba
Reviewed-by: hjk <hjk@qt.io>
2016-09-14 14:17:40 +00:00
hjk
53f6e6b8a9 Debugger: Add display of captures to QRegExp dumper
Change-Id: I345c72091002fad16af4549332bb7d8a1fb88155
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-09-14 13:53:07 +00:00
Christian Stenger
ba176316aa Dumper: Re-enable bundle related information on OSX
Change-Id: I8fbfeed09720379b01af7ae59fe8543c898b3883
Reviewed-by: hjk <hjk@qt.io>
2016-09-14 13:28:22 +00:00
hjk
e1ff0a1823 Debugger: Remove last traces of Dumper.is32bit()
Change-Id: Icb3b3bd472361816965b60b9f3cd0771aa4b99fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-09-14 12:59:30 +00:00
hjk
2244e2b26c Debugger: Use direct memory instead of member access
This introduces a dumper types abstraction layer with classes
Dumper.{Value,Type,Field} wrapping either gdb.{Value,Type,Field}
or lldb.{SBValue,SBType,SBField} and uses it to move
to more direct memory accesses in the dumper implementation.

This way we can use duck typing for artificial intermediate
objects eliminating the need for {gdb.Value,lldb.SBValue}.cast()
in some case which are flaky in general and typically not
available in release builds.

As consequence QRegion and QVariant dumper work without debug
info now.

Change-Id: Iea2411175ef67f2bf651ee7eaade9879ed5ceba1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-09-14 12:38:45 +00:00
hjk
7efa4e8c9d Debugger: Add a comment to dumper README
... on the minimally needed interface for additional backends to
be used with the dumper infrastructure.

Change-Id: I4afb5b5bb16a0499311e70499a6d58e374fce3b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-09-07 13:46:46 +00:00
Eike Ziller
c56aa52b80 Merge remote-tracking branch 'origin/4.1'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/qmakeprojectmanager/makestep.cpp
	src/shared/qbs

Change-Id: If1787ed23afa786ed2cef57f53c1db642559cbe0
2016-08-31 14:40:38 +02:00
Alexandru Croitor
3b35d39910 Fix debugger to correctly interpret stdout availability behavior
Previously if program execution was paused, and a c++ command was
executed via executeDebuggerCommand method, which in turn printed
to stdout, Qt Creator would assume that program execution has
been resumed. But in reality the execution was still paused.
Make sure not to report the program execution as being resumed, in
case if something is printed to stdout as a result of a debugger
command.

Change-Id: I8752be00b1bf5bd4767debc2eb26b9a433f251bb
Reviewed-by: hjk <hjk@qt.io>
2016-08-30 08:12:02 +00:00
hjk
00a8573502 Debugger: Fix use of GDB's own pretty printers
... with newer versions of GDB.

Looks like their internal behavior changed (again...)

Task-number: QTCREATORBUG-16758
Change-Id: Ic3a092091bac73df92a3a9f33ab863e4b6ece9b4
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-08-26 19:30:12 +00:00
David Schulz
481f083069 Dumper: Fix value of not callable pseudo member
Task-number: QTCREATORBUG-8124
Change-Id: I86ab891f18d9a0cc58217711637c8587cd42bb07
Reviewed-by: hjk <hjk@qt.io>
2016-08-25 12:33:09 +00:00
hjk
3dfe728272 Debugger: Explicitly convert to integers in some dumpers
More in line with other places.

Change-Id: I0828b5ce0469f4c71081d45250c72acabb363b1a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-08-23 05:46:05 +00:00
hjk
56548a13bb Debugger: Fix metaObject extraction logic
A variable name mixup, potentially leading to endless loops.

Change-Id: I43f430ec89a8230da665fbfcef8d7f1491b0e2c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-05 13:01:21 +00:00
hjk
36875ad4f3 Debugger: Move rarely interesting [extraData] out of sight
Together with [metaObject] and [connectionLists]. This also
saves a few cycles in the main code path.

Change-Id: I8460267f04a0c1d63ab0f991450863669cc760e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 13:21:42 +00:00
hjk
d5d449e421 Debugger: Fix display of dynamic properties
While the properties were dumped properly, only the number of
static properties was shown.

Change-Id: I3ccd98478e62d99849f5012121d2ff2bda500319
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 11:46:44 +00:00
hjk
d1109c50e0 Debugger: Deactivate metaObject extraction by inferior call
This seems to have side-effects on memory contents. Right now it is
unclear what happens exactly, so revert for 4.1rc.

Change-Id: I7b1b8e376ac84b6656b1abdae720d7bead1c0b89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:45:47 +00:00
hjk
4c4698917e Debugger: Robustify QObject detection
Change-Id: I24aa26134e674725c84f511ac610dc06a76a775d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:45:33 +00:00
hjk
7b1a1305db Debugger: Use '[d]' for artificial QObjectPrivate member
Derived classes might have a real 'd' member. '[d]' on the other hand
is not a valid identifier and also fits into the '[children]',
'[parent]' etc scheme.

Change-Id: I60650a032c49caef1bf5553ebaae8d6b7d219d44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:18:12 +00:00
Oswald Buddenhagen
034cff4693 Merge remote-tracking branch 'origin/4.0' into 4.1
Change-Id: I71d3064a5f65ec658a7ecf248bdce0a3aeea89f4
2016-07-27 12:45:54 +02:00
hjk
7037644252 Debugger: Show object address with LLDB if there is nothing better
Mimic what GDB does.

Change-Id: Ied3fff41339220eacc5c942b3f30e744f9f32a21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-25 08:56:34 +00:00
hjk
539e33da02 Debugger: Improve QObject related dumpers in release builds
Make QMeta* dumper work without debug info.
Show QObject parent and children list in this case.

QObject properties are not visible, and neither actual type
of QObject children.

Change-Id: I05417a7d78084234403a964f683db6867b6686f0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-22 08:22:03 +00:00
hjk
39206931f1 Debugger: Mark out of scope variables as such
At least LLDB reports sometimes out of scope variables as such.
Report them as "out of scope" instead of letting the common
struct dumper fail and report its generic "not available".

Change-Id: Ic9d0d196894ef811fab8e6a586bf55d80cd02e45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-21 13:29:57 +00:00
hjk
26fa769bab Debugger: Add dumper for QMeta{Enum,Method,Property}
Task-number: QTCREATORBUG-16593
Change-Id: Iaa710660d8ef69459596f93831cf8467913f0468
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2016-07-15 10:44:03 +00:00
hjk
5dcf23f62d Debugger: Disable QDateTime dumper for Qt >= 5.8
Chicken out for now after latest internal structure changes.

Change-Id: I66e283e52f9b51a51065520ecd3eb07b15e82fc2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-15 09:07:20 +00:00
hjk
a12420c995 Debugger: Improve QMetaObject dumper
Change-Id: I690e95f5f4651331f6b2407636253770a9bb92a0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-07-13 15:57:37 +00:00
Alexandru Croitor
be72a94472 Debugger: Show formatted contents of WebKit strings in local view
Change-Id: I616c19be20bf32789ab052fdec2b228e145e6be2
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-07-06 07:49:06 +00:00
Oswald Buddenhagen
69c8b9271c fix qt namespace retrieval when an early break happened
the logic to retrigger the namespace retrieval was broken, so if it was
triggered for some reason before qt was "sufficiently available", the
bad/failed guess would persist.

Change-Id: I90e02247142814bdc3f6d5cddfc0c2fe37665a3e
Done-with: hjk
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-07-05 14:58:52 +00:00
hjk
726b907cc3 Debugger: Remove debuggerstringutils.h
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-09 08:09:46 +00:00
hjk
b198d482cf Debugger: Robustify Qt version extraction
Task-number: QTCREATORBUG-15497
Change-Id: I61b52d23e0acf69e2030f8dca2691fbaa6b309ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-07 05:33:13 +00:00
hjk
e108d6fe48 Debugger: Fix transport of negative signed chars
Change-Id: I9b25d4b8e4b68d9cef674581d1a42eb75e21ec56
Task-number: QTCREATORBUG-16353
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-31 12:12:33 +00:00
Eike Ziller
0c5bae640b Merge remote-tracking branch 'origin/4.0'
Change-Id: I80bc3371c6d7cf9f2d46cbcf8e79e4761213d8aa
2016-05-27 12:01:36 +02:00
hjk
fbc82d3f88 Debugger: Fix dumping of numeric QJsonValue inside arrays
Task-number: QTCREATORBUG-16313
Change-Id: I544e89fc964cd404652d8ea0c8df127e51235292
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-24 13:09:19 +00:00
hjk
98214c5a0f Debugger: Robustify disabling of system pretty printers
There seems to be systems producing non-ASCII error messages when
running this in directories with non-ASCII characters. Since we
won't be able to workaround, silence the error to not disturb
further operation.

Change-Id: I527ce10c062273d2f4928f2a8fab79b704de067b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-24 11:50:45 +00:00
Eike Ziller
6efd8e33e2 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I6217662f0c51d04a83f7a85dc5d7c7f25e78e09a
2016-05-13 16:24:37 +02:00
hjk
0ce54ce1e4 Debugger: Guard QObject property extraction against failures
Nowadays, the [property] section contains only "top level" properties,
inherited ones are available through by expanding the base class.

Task-number: QTCREATORBUG-15798
Change-Id: I40475500a2d20f27145a47fa7ed1e61d4a592c10
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-12 11:25:04 +00:00
Eike Ziller
3d751dcf44 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	share/qtcreator/debugger/creatortypes.py
	src/plugins/beautifier/clangformat/clangformat.cpp

Change-Id: I1ab281c190767ced8a6ac2c026a121ea229a36cf
2016-05-11 13:28:35 +02:00
David Schulz
3d9ef5c813 Debugger: Collect results of the map object in python 3.
map() directly returned a list in python 2.
Fixes a startup issue on windows.

Change-Id: Ib4b67ca98a74135ff108546f8d089686f7df9493
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-11 11:25:46 +00:00
hjk
2813aed0ce Debugger: Add a QArrayData dumper
Helpful when inspecting staticMetaObjects.

Change-Id: I32fa0797625a675a7bad7f470ed51232734de826
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-11 07:25:04 +00:00
hjk
03ad75ef80 Debugger: Add dumper for Qt Creator's Core::GeneratedFile type
Useful for debugging 'New Project' type wizards.

Change-Id: Icabb4610e34a876b814965ed2b0d3017b5352878
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-11 07:24:56 +00:00
Eike Ziller
9e66ce48e4 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/autotest/testcodeparser.cpp
	src/tools/clangbackend/ipcsource/clangbackendclangipc-source.pri
	tests/unit/unittest/unittest.pro

Change-Id: I9db4fbea6ea7c9fdd0d8e1703735af20c92e754b
2016-05-09 16:37:41 +02:00
hjk
482bbec175 Debugger: Fix QUuid dumper with large numbers and LLDB
Change-Id: I357063022435d461d0b52c14541a4dfae69a1cdb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-04 10:32:20 +00:00
hjk
7ee52d4764 Debugger: Disable QModelIndex dumper
The inferior calls to rowCount() and columnCount() used to create
data() display are troublesome when debugging an actual
issue with item models and not too helpful otherwise. People needing
that information can still evaluate idx.data() etc manually.

Change-Id: If736afbf8fc44cf28e7f07e5f2c3b039a2f4984c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-03 14:40:57 +00:00
Eike Ziller
0f94aa3f4d Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/projectwizardpage.cpp
	src/plugins/projectexplorer/xcodebuildparser.h
	src/plugins/qmldesigner/qmldesignerplugin.cpp
	src/tools/clangbackend/ipcsource/translationunits.cpp

Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6
2016-05-03 11:49:01 +02:00
hjk
6a50dbd2aa Debugger: Disable QAbstractItemModel dumper
The inferior calls to rowCount() and columnCount() used to create
the "n x m" "nice" display are troublesome when debugging an actual
issue with item models and not too helpful otherwise. People needing
that information can still evaluate m->rowCount() etc manually.

Change-Id: I3a3feed6aab19096ab01bc91c488de5fcbd732d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-02 11:29:06 +00:00
hjk
238d045b87 Debugger: Show (qmake's) ProKey type as ProString
Saves one level of expansion when looking at containers.

Change-Id: I4d43af2fb0dd0e9d493a12335d6b8b541e741ecf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-04-28 13:24:09 +00:00
Eike Ziller
4a826ada04 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
2016-04-22 15:13:58 +02:00
Alexandru Croitor
7158f37447 Fix reference values to be shown in debugger view.
Change-Id: Ia8e6da004ea22515fccf4292cc3ddd8c530040c2
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-22 06:08:55 +00:00
hjk
43b8310830 Debugger: Disable dumper for QVariants with user defined types for LLDB
The type info is not directly accessible to the debugger. The workaround
used so far generally works for initialized data, but can force loading
all debug information otherwise. The behavior is exceptionally bad
for LLDB 3.7 with GCC 5.x/C++14 due DW_TAG_base_type 'auto' encoded with
DW_ATE = 0x0, bit_size = 0 produced by GCC and not understood by LLDB.

Change-Id: I2b28b8a6aa15751c8e797bcbf501b81622680596
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-20 15:50:53 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02:00
hjk
c0fabbe169 Debugger: Add breakpoint commands for LLDB backend
Commands needs to be given in Python, i.e. something like

    import time
    print time.asctime()
    for i in range(1, 10):
         print(i)

works.

Task-number: QTCREATORBUG-15585
Change-Id: I7724617e4bbe85a717ae78b21014e2b55c4089c8
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-15 10:50:45 +00:00