Makes it clear that this is meant to be immutable and is supposedly
faster.
Task-number: QTCREATORBUG-17823
Change-Id: Ie5d67b793e0bc4f704981d5161efc12bcc22100a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In certain cases FindFirstType can fail to find a type due to bugs
in lldb. The workaround consists in using FindTypes, and iterating
over the results to find the searched for type.
Change-Id: I1fee3f774d0cf02842f6b55419142af5e9780992
Reviewed-by: hjk <hjk@qt.io>
Needs to make namespace detection work without valid frame
Task-number: QTCREATORBUG-17326
Change-Id: Ia7c7017db4ef384d4f246e11a5601d01f4f366f1
Reviewed-by: hjk <hjk@qt.io>
... and use the option to govern general QObject guts display.
This allows people to completely avoid the performance impact
of attempted QObject display and still makes the feature
more prominent for our favorite use case.
Change-Id: I1e53b6448f646ab7eea9168a3cd24c77769e6328
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
A truly empty base wouldn't need content, but LLDB 3.8 reports declared
but not defined undistinguishable from empty bases. At least for the
common case of a single inheritance class we can continue dumping by
fake base class contents by fake the contents by using the whole derived
object's data.
Change-Id: I82d595b985ec1289d8abce5fccd217057d2d2d44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The 'output' bit is inserted at report time, not at callback
script generation time.
Change-Id: Ibb5c9b09d8391d1be86b8f110e32ab1c90f6bab2
Reviewed-by: David Schulz <david.schulz@qt.io>
It has a function directly doing that, use it instead of
guessing (badly, in some cases)
Change-Id: I1ce317c28d60f820f8e868e3c0c5a665f8de6cb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
They are not usable in core files.
Change-Id: I2134b61f27c27862c12a679d0acf7bebc9fcc7a2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Use the fact that the order of the first three vtable entries of a
QObject is fixed and the size of their implementations is roughly
known.
Change-Id: I3d13f594cb1c1f162a520da18b2bc2aaba852092
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is a partial revert of the type id change (bd2653fb) to get
the case of virtual bases work again, as it falls back to native
field accesses everywhere we have native types.
This is likely to be a performance regression with CDB/Python,
but since this combination is experimental and not used by
default in 4.2 getting GDB/LLDB right is more important.
Medium term we might want to have a more fine-grained approach
to use of type ids (e.g. use native field accesses on a case-by
-case base only for type with virtual inheritance)
Change-Id: I239111e6ce5f3365b750068bfc4dafb12be1d53c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use the field's type size if the reported field size is 0.
Change-Id: I7db49507d0ea7358b6db27dfa206f2b079bbf876
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
There seems to be race in the LLDB setup on Linux. Work around
by not doing serious work twice to be able to use the test at least.
Change-Id: I387a57d3c66e6c4209bd424af9be16f17acb98fa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Move all the currentFoo initialization to DumperBase
Change-Id: I0a59715fe1550f466e78cbf678622dd8dfe1783c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Instead, push backend differences into a more generic reportResult()
function.
Change-Id: I6bc34580e915b830e592680022b3499ae5eb1e57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Lowers the barrier for other debugger backends.
Change-Id: I09e0ad09548b6b4220175245cc0d845ac5aa29d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
It's not the one of the lldb process anymore, so set it explicitly.
Change-Id: Ibcc2b63631c4096f860996ad6ccfc12415d8aefd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
GDB and LLDB share some ideas but are not identical. Map them
both to what we need in the end. This also reduces the size
of the Type class interface as a step towards more type info
caching.
Change-Id: I43e60c4e5736ac15a5c776832ffb8e6939f45e45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Easier maintenance if code is typesafe. Whatever that means in Python.
Change-Id: I450e5d42bcfdb30d607dd878353d037ba18fe6d9
Reviewed-by: hjk <hjk@qt.io>
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>
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>
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>
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>
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>
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>