There's no need to go through unknown enum sizes here, they are known.
Also, make it work for namespaced Qt. Avoid casts to typedefs.
Change-Id: I9c6fc44a03a0c245f05957306a129f6902f8cf85
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The SetSelectedThreadByID method expects an integer, and not
a string.
Fixes: QTCREATORBUG-21563
Change-Id: Ibd5538a3214b73d7e87e66b59d6b9af0b93effeb
Reviewed-by: hjk <hjk@qt.io>
Prioritize displaying as enum if a type is known
to be an enum. Otherwise this would just end up
get displayed as string representation of its value.
Enable respective dumper tests.
Change-Id: I3e5406e14a68f02741b6144bb54528b72cc8192d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
QEvent dumper will now show an additional [type] field with the enum
name representing the event type (aka the value of QEvent::type()).
For example: 'QEvent::KeyPress (0x0006)'.
QKeyEvent dumper will now show a value similar to:
"Pressed 'F' (key:70 vKey:3 mods:Shift)" as the initial non-expanded
value.
A new additional field called [Qt::Key] will show the enum value
of the key pressed, for example: Qt::Key_F (0x0046)
Change-Id: Id91431d0e3d3adeb89d6b74ea341a335ff37efdc
Reviewed-by: hjk <hjk@qt.io>
The bitpos value returned by lldb is the bit offset relative to the
beginning of the type, there is no need to do an extra modulus
operation.
Adjust dumper test to add the previously failing case.
The failing case happens when the class containing the bitfield has
more members in front of the bitfield.
Change-Id: I93678f78e6799843558ec53342a0ed49cac74f48
Reviewed-by: hjk <hjk@qt.io>
The dumper calls PyObject_Repr and shows the result of that as the
value of a PyObject.
It also adds three new sub fields to show the object class (type),
super class (base class), and the meta type (the type of the class
object).
Change-Id: I0612833321f6d2b50826588e775cfa12e1db28e4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This is achieved by calling "po" on an address value casted to a
simple function pointer type, regardless of the actual type of
the function pointer. lldb does not complain, and reports the
library where the function is defined, its name, and location
in the source code if available.
Change-Id: I23ccce62e33bcf213ccdcb55c9836d54333f3c86
Reviewed-by: hjk <hjk@qt.io>
Needs some hint that floats are involved.
Change-Id: Ie6871ce3b6bb7aaff27e6c763a6002a6d0a90d70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
On Linux. Required installs are the gcc-built Qt libraries themselves,
the "Sources" and "Qt Debug Information Files" components.
Fixes: QTCREATORBUG-20693
Change-Id: I920efd641ce3ee4583741ea1db0bea18031adc51
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Mostly for sanity reasons when debugging the QObject dumper itself.
Change-Id: I7d6267625f091788e73b0b28695e9b99e33ab3e3
Reviewed-by: David Schulz <david.schulz@qt.io>
The 'putSubItem' method expects an object of the
Value class as defined in 'dumper.py'.
Therefore, create such an object for the gdb.Value
when passing it into the method.
Task-number: QTCREATORBUG-21000
Change-Id: I5277f832ee2aae808824f3dcf728fdaa0e2a3c78
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Use the name attribute of the gdb.Type rather
than that of the pretty printer.
This e.g. displays 'std::vector<int>' rather than
just 'std::vector' for an int vector.
Change-Id: I53da01bb5ba67bcd8d7113beda6ff03e708d60f9
Reviewed-by: hjk <hjk@qt.io>
It has an internal QWeakPointer<QObject>, which is not helpful. Cast to the
QPointer's template argument instead.
Change-Id: I9308c5eb9ea3867a682c4e4cba5d8041547981d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
When used in SubItem, enums were displayed as
"value of type E at address <addr>".
Change-Id: Ieecfb791126c6f63f272817afc6c8d05f28b9242
Reviewed-by: David Schulz <david.schulz@qt.io>
Qt Creator failed to properly display GDB's LazyString.
The problem was that GDB's 'PlainDumper::__call__' passed a 'gdb.Type',
while 'DumperBase::putCharArrayHelper' called methods that are only
defined for the custom and more abstract 'Type' type defined in 'dumper.py'.
As described at [1], GDB's 'LazyString.type' "holds the type that is
represented by the lazy string’s type. For a lazy string this is a pointer
or array type. To resolve this to the lazy string’s character type,
use the type’s target method."
In addition, 'gdb.Type' does not have a 'size()' method, just a 'sizeof'
member, s. [2].
Since all other uses of 'DumperBase::putCharArrayHelper' are passed
a "proper" type, extract the code common to the GDB case and all others
into a separate method and directly call this one for the GDB LazyString
case.
[1] https://sourceware.org/gdb/onlinedocs/gdb/Lazy-Strings-In-Python.html#Lazy-Strings-In-Python
[2] https://sourceware.org/gdb/onlinedocs/gdb/Types-In-Python.html#Types-In-Python
Task-number: QTCREATORBUG-20939
Change-Id: I16608668c9403b6d8e509dab17eb1788586f453e
Reviewed-by: hjk <hjk@qt.io>
Judging from the code it either never worked, or LLDB changed
syntax at some time. In either case, having it in a usable
state with current version is an improvement.
Change-Id: I88b15969bf28b92735d860544dedcbd1d9689765
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
No real damage, the parser on the Creator side is apparently robust
enough. Still no need to add this.
Change-Id: I8329a55c44f866070fb3df48c3a22000ee33e848
Reviewed-by: David Schulz <david.schulz@qt.io>
Make the hex display work with LLDB, fix GDB and LLDB test.
Change-Id: I529b5cdc908dbcba7270bc4574fa59a012fcacad
Reviewed-by: David Schulz <david.schulz@qt.io>