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>
This is with gdb 7.4.1 linked with python 2.7.3
Change-Id: Idf921afd37d72056874c7179c899f62f791f9282
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
CamelCase might be more Qt-ish, but the backends tend to use
lowercase only.
Change-Id: I04b9b7305b54226f27b70151115050c4816f911f
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>
They produce no values later anyway and are slow to process.
With this patch, stepping in VME::run from qv4vme_moth.cpp
takes about 1s instead of more than 40s previously.
Change-Id: I5c96966612bdb7c0120d9ebb545d6e8483cbf843
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The detection seems to go wrong in some cases on RHEL which
are not reproducible locally.
Since the feature is not important for Qt Creator's own use,
disabling is safer than attempting to guess better.
Change-Id: I95fd56985d61b604a285e7573f8775b902bcc68c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
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>
This avoids inferior calls, i.e. is faster and more robust.
Task-number: QTCREATORBUG-14350
Change-Id: I9f21eda6e2e3950eaaca90a35afb885e76e789d8
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>
AttributeError: 'NoneType' object has no attribute 'startswith'
Change-Id: Ieb08c33cce06ad484de856b249ab4723b01d520e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... when listing members of a struct in the Locals and
Expressions view.
Task-number: QTCREATORBUG-14767
Change-Id: I5089dd3bcba40ab335be164c5de2f2d70c3ed4f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
... when passing data from the dumpers to the GUI. This reduces
the need to guess whether a value contains a translatable string.
Change-Id: I5e2210b8d028bd71f0087a2ba5c7c5b04331b882
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
It's an implementation detail of the gdb side (and would not
be there if gdb.lookup_type were faster)
Change-Id: I135c32a1c9132ab771c8fab5abfd04fbb308891e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Simply relying on '[' < any_letter is not good enough in the
presence of uppercase identifiers.
Task-number: QTCREATORBUG-14637
Change-Id: Ib0e305c0b86f3b117c07de18cde00b14f424a7c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Needed to debug the QmlDebugger.
Change-Id: Ia0b50dac2146fcc81990b78eb8de30c8e763bba2
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Also correct typo in function name.
Task-number: QTCREATORBUG-14629
Change-Id: I193efc3a002f83b0091f93e087f2feb19dc4f5c1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Occurred when I tried to expand an object that contains 2
unnamed unions (CPlusPlus::Token)
File "gdbbridge.py", line 1113, in putItem\n self.putFields(value)\n'
File "gdbbridge.py", line 1150, in putFields\n fields.sort(key = lambda field:\n'
'TypeError: unorderable types: str() < NoneType()\n'
Change-Id: Ica38750435ae851b52d87dc6fcc59118d3f1d8ee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The request will be honored when creating the values
instead of re-sorting in the frontend.
Change-Id: I0ea13bd9b0700a4d2ae4f0b355c56ddd37557398
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
On MSYS2, if QtCreator is launched from one of the msys2 shells
then the MSYSTEM env. var is set and our Pythons set os.sep and
os.path.sep to '/' so that it aligns with the default separator
of those shells.
fromNativePath(str) then fails to convert '\' seprators embedded
in binaries since str.replace('/', '/') is a noop. The operation
we want here is to convert all '\' to '/' anyway so this is more
explicit regardless of any opinions on our choice to dynamically
vary os.sep and os.path.sep
Change-Id: I76c05b188abca41c6a1b516c68b584e0c06e7235
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This partially reverts commit e33da6a6b3.
GDB seems to hang while executing str(some_pointer) in some setups.
Task-number: QTCREATORBUG-14374
Change-Id: Ia678533b9122e505b21ef6659d404239995ddb81
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Not much harm done, the code was meant to raise an exception anyway...
Change-Id: I81db4081b4ca583e46a826aaee2fc8fa3f186a11
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Older versions of GDB (~GDB 7.4 on 32 bit) will cause segmentation
faults in inferior calls due to misaligned %ebx values in an SSE
call in qstring.cpp:findChar.
Change-Id: I44492106080f12e645f9d57828438ec70fd66ca6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This practically removes any functionality beyond plain plot display,
but does that at least reliably, cross-platform, without dependency
on 3rd party python packages.
Change-Id: Iaff2f78595394522f32264c642df20dd48b83f8b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Move common code to dumper.py and debuggerengine.cpp and
fix it there.
Change-Id: I20d91d1aa7400fbdb27938c10cf40c8f6019df0a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
It was falling into the full update branch as the passed
parameter was not a list anymore.
Change-Id: I314beb3a68f8791483a599c7d5782fd454983840
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The current setup (dumper->gui: list of descriptions,
gui->dumper: index in list) is fragile and not easily
i18n'able. Go with an enum based approach now.
Change-Id: Ie78c596065a8b2ba87ad725274da29d4be3a6da4
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>