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>
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>
A variable name mixup, potentially leading to endless loops.
Change-Id: I43f430ec89a8230da665fbfcef8d7f1491b0e2c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
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>
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>
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>
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>
Easier to coordinate between dumpers and watchhandler
Change-Id: Ide191a5786dc04ef22c3e9c8b0bec39f8f8c0f1d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Individual dumpers can override. User accessible gui to be done...
Change-Id: Idf81dab11f810b43fc6721cbb37d12a1365a8634
Task-number: QTCREATORBUG-16021
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The pattern is given as (unused) default value of a third
parameter of the dump__* functions.
Change-Id: Ia9092427c240f2198acd00267cd136a3becc71b6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Pointers often don't have an address at all, or have the pointer's
address instaed of the target address.
For example:
int main()
{
char str[11] = "HelloWorld";
char *s1 = str; // s1 shows its own address
}
Change-Id: I2436578c073a00a3fec9411ef7ec82ae4e63a8b0
Reviewed-by: hjk <hjk@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>
Can happen when an array is declared as `extern Struct arr[];`
Change-Id: I7e9e0a5e73799dc29bfe6a71ad60d3d51a709cef
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>
... 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>
Execution will continue for now, but not for long.
Change-Id: I1abc57e6375e5ec4d24c7299f68f59c5bb06f3c9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This addresses QTCREATORBUG-15426 for the case of well-known simple
types (int, float, ...). Retrieving 1 mio ints takes now ~15s instead
of ~140s.
Task-number: QTCREATORBUG-15426
Change-Id: Ifb7c957d60504e23147d499d8bb9bbd41c5a53ba
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Function-local struct definitions produces types 'names' like
'QList<main(int, char**)::SomeStruct>'. Remove the part up to
the '::' and rely on local lookup.
Task-number: QTCREATORBUG-15400
Change-Id: Ic73005f294c5f62c504b2d7ded4dd2716d88f2e4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Property values are stored now using a QVector, not a QList.
Change-Id: Ifc8d6b856d2aff5ce4565c43111132f2a73460df
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
With C++11 we use std::atomic in the ref counter, giving yet
another possibility of structure member names. Instead of
trying to keep up with that, access the binary data directly.
Change-Id: Iabea831689f58f83150287218bb015c824e888ca
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The objects have been reported as 'having children', but
when asked for them nothing was produced, leading to an
endless loop (until the next 'step' command).
Change-Id: I3bbfe10a7ed980b27a5fca1edfe44dd8983b8f7b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
from actual reponse handling
New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.
Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The module doesn't exist in Python 2.6, so we can't use it
unconditionally if 2.6 is to be supported again.
Task-number: QTCREATORBUG-15076
Change-Id: Ic91cdf451ce846d892cd914bf850a4fd4b18c488
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... instead of the custom mechanisms to funnel breakpoint ids, cookies
and similar through individual bridge functions.
Change-Id: I2b6e906078eefdbcd4ffa166dc1881a1d0f7fb51
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
While the formatted value is usually all that's wanted,
having access to the individual chars is handy at times.
Change-Id: I53b0d0ccfe4289b9b54a1caced4e0bd5ac66d9fc
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
- Move DisplayFormat from watchhandler.h to debuggerprotocol.h
- Add/update a few comments about the use of the protocol enums
- Make decodeData take a DebuggerEncoding instead of an int
Change-Id: I50bed70a5da2e94da46e894bf9136bc14c9a1b23
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... by re-using the logic we had for std::string already.
A plain char[] value did not react to Change Display Format,
Latin1 was used unconditionally.
Also rename putStdStringHelper to putCharArrayHelper.
Change-Id: I01fdf796ff49a4c99ead7b9b46274684e18e962b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>