summaryrefslogtreecommitdiffstats
path: root/src/corelib/debug_script.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix lldbbridge.py loading when using lldb + Python 3 from CLIAlexandru Croitor2021-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or from Xcode. A command line lldb that uses python3 fails to load the 'utils' module dependency when importing lldbbridge.py via the dSYM script debug_script.py. Add the directory where lldbbridge.py is as an additional import path to sys.path. This fixes the bridge to load in both CLI lldb and from within Xcode. Traceback (most recent call last): File "src/corelib/debug_script.py", line 92, in __lldb_init_module bridge = import_bridge(bridge_path, debugger, session_dict) File "src/corelib/debug_script.py", line 42, in import_bridge bridge = imp.load_source(MODULE_NAME, path) File "Versions/3.8/lib/python3.8/imp.py", line 171, in load_source module = _load(spec) File "<frozen importlib._bootstrap>", line 702, in _load File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "Qt Creator.app/Contents/Resources/debugger/lldbbridge.py", line 34, in <module> import utils ModuleNotFoundError: No module named 'utils' Amends 1b73c202ce907cd03864413f472bfeb5abf5151e Pick-to: 6.2 Change-Id: I521d7530e35ee9c51ae0418d2c532e58ec1952d0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* corelib: update debug_script to python 3Cristian Maureira-Fredes2021-07-081-5/+5
| | | | | | | | | This script was written for Python 2, which is deprecated now. Change-Id: I534c93922776254a4c822ac60c6fd77ca7cb9760 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: hjk <hjk@qt.io>
* macOS: Add LLDB debug script when building with separate debug info (dSYM)Tor Arne Vestbø2017-07-071-0/+98
The script will look for the most recent Qt Creator version on the system, and pick up the LLDB summary providers from there, allowing pretty-printing of Qt types inside LLDB/Xcode. LLDB will detect the file when loading the dSYM, and inform the user that the file can be loaded to enable the formatters. The script can be loaded automatically by adding the following setting in ~/.lldbinit: settings set target.load-script-from-symbol-file true Which comes as a slight security risk, as other libraries might have scripts of their own. The alternative is to load the script directly from ~/.lldbinit: command script import "<path to debug script in dSYM>" With an optional target.load-script-from-symbol-file set to false, to silence the warning when loading the dSYM bundle. Change-Id: I01ba51dab725a8d0a58f1ad1749742443b639cc5 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>