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>
Commands needs to be given in Python, i.e. something like
import time
print time.asctime()
for i in range(1, 10):
print(i)
works.
Task-number: QTCREATORBUG-15585
Change-Id: I7724617e4bbe85a717ae78b21014e2b55c4089c8
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
They may contain quotes and possibly other data breaking the transport
protocol.
Change-Id: I53795bd1de54385e8d9c50088368fdc768db217b
Task-number: QTCREATORBUG-15635
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: hjk <hjk@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>
LLDB 3.8 on Linux claims non-existent files to be the source of
disassembly.
Change-Id: I45a47cf5e7faad7ccd6dbb9879c8328fc2496b95
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>
At least on Linux/LLDB 3.8 trying to set watchpoints at fixed address
produces breakpoints with .IsValid() == False that choke on accessing
certain functions like .IsOneShot() used e.g. in breakpoint data
reporting.
Now report the .IsValid() state and skip the reporting of the "bad"
fields.
Change-Id: I742ed171f37763f3dbbd896173c527817edf3a6e
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@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>
... 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>
Apple's LLDB has changed behavior between 330.x and 340.x.
Newer versions seem to actively delete the DYLD_IMAGE_SUFFIX,
DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH environment variables
from the scripting environment.
Change-Id: I0b7bbdce0975e969b1dae5770fd9a99328f241be
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
... in the presence of empty base classes. This now actually makes
the Inheritance dumper test pass.
Change-Id: I92ada5da46accb6e7eaff58ce5dc329484ef0909
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... as well as the 'autoderef' flag. A lot of dumper tests were
failing even though the dumpers themselves were ok.
Change-Id: I198784d95eb0004e81bfab995121e048b1722c66
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Empty base classes are counted towards GetNumberOfDirectBaseClasses()
but do not get reported in GetChildCount(). Fix the difference by
manually creating empty base class entries in the report.
Change-Id: I2650d9f5234302c5bf2fa0e62a886d3a39fc11db
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>
... 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>
lldb.thread.RunToAddress does not seem to hit anything on Linux.
Fake it by setting a temporary breakpoint + continue.
Change-Id: I533c8fb42c9a3d1ac1e5cc23eae8162a3455fb9a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.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>
This was needed with earlier, now unsupported versions of LLDB to
provide a target context for evaluation of expressions.
Not needed anymore since SBTarget.EvaluateExpression() exists now.
Change-Id: I31871937832439dbd98b763ac77eab4db56ef2ee
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
They can appear for unnamed function parameters with default values,
e.g. void foo(int = 0).
Change-Id: I02cad093247f4508e7d4c4fd3f143c9ad8d5ebd1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Needed to debug the QmlDebugger.
Change-Id: Ia0b50dac2146fcc81990b78eb8de30c8e763bba2
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>
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.
Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.
Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@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>
This brings it into line with GDB output and is needed in
the frontend to provide normal integral value base changes.
Change-Id: I17adc7730419648d45c0d5866311de33bf01a7f0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>