Use Python's list and dict output directly, instead of
a manually stringified version thereof. Also, report
milliseconds instead of microseconds.
Change-Id: Ibcbdea732e7ecc58fd672bc5da794832215865b4
Reviewed-by: hjk <hjk@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>
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>
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>
It doesn't seem to be needed anymore, and if it were, it'd be the
task of the back-end specific fromNativeType() functions to sanitize
type names.
Change-Id: I7c6af40aeacb2dbaaf73143e9fdcc1d866bf3f3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Determining dynamic type is a best-effort business that
tends to fail in setups without debug information.
Change-Id: Id24fc70ac15cf2957ed1c91d5782b8a7c0677bf2
Reviewed-by: Christian Stenger <christian.stenger@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>
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>
gdb.Type.name is not available there, but str() works.
Change-Id: I61c3018e728e634509d4028f624dc1213c62a290
Reviewed-by: Christian Stenger <christian.stenger@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>
... 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>
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>
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>
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>
It was there for GDB at a time, but never for the other backends.
Fix the GDB regression and make the sorting consistent across
backends.
Task-number: QTCREATORBUG-15296
Change-Id: If728c65f0c8ca4a8378c7cf5e53f1dadbfb72b29
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Backends only have to specify whether an object members are sortable
in principle (e.g. all structs), and some numeric 'sortgroup' value
for member items (higher values are always sorted on top).
Change-Id: I10ce94580374fed48a35f058a575a1408d6801af
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* Update license of files loaded in debugger
* Make sure all files have a license header
Change-Id: I612885652bcae0a4b7a88ae5184ef661aee25006
Reviewed-by: hjk <hjk@theqtcompany.com>
LLDB on Linux did not like a plain toInteger() in some cases.
Change-Id: I4fb640df52218a3df04f3ce5092eb5fbc8b5acd5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Don't instantiate repeating boilerplate item data in some
cases (such as large arrays).
This makes it necessary to access parent WatchItems in
a lot more cases than before and needs another separation of
WatchItem/WatchModel code to keep the dumper autotests
in a functional state.
For a plain std::vector<int> with 1 mio items this reduces
extraction time from more than 2 minutes to about 3 seconds.
Change-Id: I175c5f6ee90434a6e85342d8bb71bd10a04dd271
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
... into a string specifying a kind of encoding (utf8, latin1),
an optional bytesize (2-byte integers, 4-byte integers) and a
flag whether the displayed value should get "..." around it.
Scales better than adding an enum value for each new combination.
Change-Id: Iffcb1e2f148f12da96e165559a976bd34026c649
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
... and switch it off by default. The feature has indeterministic
performance impact and lost quite a bit of its utility since GDB
learned to extract dynamic object types most of the times.
Change-Id: I22cccb03ba67f9ff6ad757bbc06eb372d84bbffe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Breaks the parsing and might trigger an endless loop.
Task-number: QTCREATORBUG-15352
Change-Id: I832d26441d8be3339b4de6d59a33c97f1d7124c5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>