Fixes it for Qt 5.4 and onwards hopefully.
Fixes: QTCREATORBUG-29737
Change-Id: Ic555e304a872dfbd458a95097e4e0b6a6632509a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It's quite awkward that the user has to manually install pygdbmi
for the LLDB summary provider to work. And if the user has python
from homebrew, their 'pip3 install pygdbmi' won't be seen by LLDB
either, causing confusion.
By automatically installing pygdbmi via the python3 interpreter we
know we're running under, we simplify this for the user.
The user can opt out by setting QT_LLDB_SUMMARY_PROVIDER_NO_AUTO_INSTALL
in the environment.
Change-Id: Iad7935fd77e6f56ddf719126ef7ad1cb1a024877
Reviewed-by: hjk <hjk@qt.io>
Instead of relying on __name__ being 'lldbbridge', which can also
be the case if the lldbbridge.py script is imported into a plain
LLDB process, we can now look at the environment variable.
This also lets us break out early from __lldb_init_module
if the user has a `command script import llbdbridge.py`
in their .lldbinit, or is automatically loading the bridge
via the Qt Core debug script.
Change-Id: Id8168c692ef66ce50119b7426ca85c7bc99d9503
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When the lldbbridge is imported from the debug_script.py in qtbase,
it's imported using the module name 'qt', to distinguish it from
when Qt Creator imports the bridge.
So when we add the synthetic child provider, we need to use the
'qt' module name. This fixes the warning:
The provided class does not exist - please define
it before attempting to use this synthetic provider
If for some reason the lldbbridge.py is imported into a LLDB session
directly, we mirror the 'lldbbrdige' module name to 'qt' as well,
so that the class reference still holds.
Change-Id: I531b10fd5e10eb0c2acd6014169a02ba3157c704
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use isLldb and isGdb instead of exception.
Uses name based lookup in case of gdb instead of try/except
Fixes: QTCREATORBUG-29526
Change-Id: I6c3aa94503a519331395bd4249c6bf6488c8333f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Only errors should be displayed in the App output.
Everything else is just noise.
To keep the information for debugging purpose we log it to the
Debugger Output View instead.
Fixes: QTCREATORBUG-27160
Change-Id: I37301edd2f6638e2b4152d1bf7b89a40c9c3c0af
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
the std::nullptr_t gets reported as a pointer type with std::nullptr_t
as the target type. In order to avoid a recursive lookup check whether
the target type name is identical to the pointer type name.
Fixes: QTCREATORBUG-29291
Change-Id: I25373bf56b5538b9e5c14c34b9a5e501b5803fea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
libc++ has changed the layout of std::string again.
(see https://reviews.llvm.org/D128285)
This patch adds checks to differentiate between the two versions.
Fixes: QTCREATORBUG-28806
Change-Id: Ic21c488cf1c173120beddf414ca39040dfaba096
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This allows using dumpers available on the host being used from
remotely running gdb. No lldb/cdb yet.
Task-number: QTCREATORBUG-29000
Task-number: QTCREATORBUG-16246
Change-Id: Ib1a40a8c0284dcf41e8800d70ca3e632c699b2fa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Make Environment a stack of changes that gets "expanded" to
a full environment before things are actively accessed.
Later this expansion should be done lazily if possible.
Task-number: QTCREATORBUG-28357
Change-Id: If1c7bfdb9f58b81e71c51ed87ee75d6964a47019
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Previously lldb never actually attached to the process running
in the terminal, but started its own copy.
Since the process is interrupted by the terminal stub already,
code was added to automatically continue the process.
"Start and break on main" and "Run in Terminal" also did not work
together and are now fixed.
Change-Id: Iaeb6e7dd0f511f3bf195ab5d0008856b310615d9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
When using `lldbbridge.py`, Python throws `TypeError: string indices must be integers` because `gdbmiparser.parse_response` cannot parse the multiline output.
The bug was introduced in bb11788.
Change-Id: I5faae4c3d034c0f159e9c1e473b6929ba79b8272
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This can get very expensive for targets that have a lot or big modules,
but are not linked against Qt. On the downside we might not be able to
identify Qt namespaces in static builds.
Task-number: QTCREATORBUG-18287
Change-Id: I90e0c4afcde17fd81d49017e828ce59f0abe9b5c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
and disable the QV4::Value dumper for that version.
Change-Id: I31a0ddba2bdab3b196e4fc5298fd8e7c10f9dc92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... by caching the info whether we have a debug build. This avoids
expanding members of the container to check for a potential offset of
the actual data.
Change-Id: I4d7ac83003c303185ae51d57f0f0571b627edf22
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Adding the data as pointers allow casting the data to the actual derived
class
Change-Id: Id1b421c2729c6da8bf17054e39b4f1e8d8ff2cfa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
...for cdb when we have no nativeValue. This is the case whenever we
have a container like std::vector, QList or a c array to the base class.
Fixes: QTCREATORBUG-28337
Change-Id: I18c63dfbc207d76bf41d85d5da83f7f4603504f9
Reviewed-by: hjk <hjk@qt.io>
Directly display the containing value without the need to expand the
variant. Additionally fix the dumper for Windows and add tests.
Change-Id: Iaae49470750fa3659339331e1518e13020df7938
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Postpone the lookup until we need the type id. This potentially skips
the lookup for unresolvable types that are just to parse template
parameters. Also cache types we already checked to prevent looking up
types multiple times. Additionally traverse all modules in order to find
unresolvable types.
This combination reduces the time the debugger needs to execute all
dumper tests from ~7:30 to ~3:30 on my machine.
Task-number: QTCREATORBUG-18287
Change-Id: Ie1e9771f124096c2a9ad24ac26c9b51fcded4fed
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Directly finish the debugger when program ends if the
debugger is in running state as this feels more natural.
Only get into post-mortem handling when stepping.
Change-Id: I6ac6600a7cb8f58a003a6e4783174864ed5e89d8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Explicitly use str(), type() and similar from builtins
to avoid confusing the the debugger when these builtin
functions are overwritten by the script which is going
to get debugged.
Fixes: QTCREATORBUG-28733
Change-Id: I6b7bd1d7474972d0533d12a1bc45bb59db7f39b5
Reviewed-by: hjk <hjk@qt.io>
gobject_gdb.py puts the pretty_printer_lookup function into
gdb.pretty_printers. Trying to access subprinters of it causes the
AttributeError exception.
Change-Id: I00ce7b62866dd9c06a1f0abef0c7043ece023d34
Reviewed-by: hjk <hjk@qt.io>