aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggeritem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Debugger: Allow GDB/LLDB DAP debugger as native C++ debuggerCristian Adam8 days1-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This would allow manual registration of a GDB/LLDB DAP debugger from a CMake configure preset as follows: ``` "vendor": { "qt.io/QtCreator/1.0": { "debugger": { "DisplayName": "LLDB Dap 18.1.7 Debugger", "Abis": ["arm-darwin-generic-mach_o-64bit"], "Binary": "/Users/cristian/llvm/clang/bin/lldb-dap", "EngineType": 1024, "Version": "18.1.7" } } } ``` This way I can configure a project with a toolchain that uses a DAP debugger (not every gdb/lldb has python bindings) and have debugging working out of the box. Change-Id: Id9bff26b6544b7af99caccb18cdbe0edb334218a Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Debugger: Prevent showing the windows error on debugger detectionDavid Schulz10 days1-15/+4
| | | | | Change-Id: Id4a6d8fe345fa023d3a0bffe6e46fc2077cbfae5 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Debugger: prefer 64 bit cdb and remove auto detected 32 bit cdbDavid Schulz10 days1-2/+5
| | | | | Change-Id: I57a4b0cb25a6d33478bc7a5cde9a427cfc5214c6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Fix build with MSVC with C++20Eike Ziller2024-02-281-1/+1
| | | | | | | | | | | | | | | | | Rename process.h back to qtcprocess.h MSVC's "threads" standard header includes <process.h>, and that ends up including our process.h from Utils. There already was a hacky workaround in place for a similar issue with MINGW, but that doesn't work with MSVC because that doesn't have Simply use a name that doesn't conflict. Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Debugger: add python debugger setting in run configurationDavid Schulz2023-12-041-4/+0
| | | | | | Change-Id: Ifa5d72566007e0bb006523433dcef97689677fbf Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Debugger: Add our lldb to the system search pathsCristian Adam2023-11-211-2/+5
| | | | | | | This way the user doesn't have to manually register lldb.exe Change-Id: Id0a19de0962d8ba47a66a8d1909dfe2eb5ca0a6f Reviewed-by: David Schulz <david.schulz@qt.io>
* Debugger: Speed up startup on WindowsCristian Adam2023-08-301-1/+4
| | | | | | | | | | | The Qt SDK would not write the "Version" tag in the xml file, but the supported ABI and engine type are set. Only retrigger the debugger detection only if the version, and the ABI and engine type are not set. Change-Id: Ib73b1809f9dc6a16fa1988ee0e40e4d8131c667e Reviewed-by: hjk <hjk@qt.io>
* DAP: Add engine chooserArtem Sokolovskii2023-08-281-5/+0
| | | | | | | | | The Engine Chooser empowers users to select the desired debugging engine when initiating DAP debugging sessions. Change-Id: I070ff2620b318494ee715c5ac369765d4a9dc616 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Plugins: A bit more Keys and Storehjk2023-08-251-3/+3
| | | | | Change-Id: Iee55eeaa881dd9f2047fdbe95ad8d827f4ba34e0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}Jarek Kobus2023-05-041-1/+1
| | | | | | | | Follows QtcProcess -> Process rename. Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Rename QtcProcess -> ProcessJarek Kobus2023-05-041-2/+2
| | | | | | | | Task-number: QTCREATORBUG-29102 Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Debugger: Add skeleton for a debugger adapter protocol using enginehjk2023-04-061-0/+7
| | | | | | | | | | | | | | | | | | | | - Support the launch of an application - Support continue/pause an application - Support add breakpoint only after an app is launched (I.e. preset breakpoints won't work) - Support stop the debug session - "Remove one break breakpoint" works but removes all breakpoints ToDo: - Polish the transition between stages - Fix breakpoints handling - Add support "Step in", "Step out" and "Step Over" Task-number: QTCREATORBUG-27279 Change-Id: I5c32ce713f5a0f19cc3b9d995cbbadd8adf6a413 Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Debugger: Small corrections to "Generic" item handlinghjk2023-03-291-1/+16
| | | | | Change-Id: Idd8f6a64aa64b8f13e713b3337ad1f8f2b8735db Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename most FilePath::{from,to}Variant uses to {from,to}Settingshjk2023-01-101-4/+4
| | | | | | | | Specifies the main purpose more clearly. The remaining ones a "true" (internal) variants in models and as action data. Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Debugger: Fix environment when initializingMarcus Tillmanns2022-11-171-14/+5
| | | | | | | | | Previously when detecting / checking debuggers the process would be started with the Host environment set. This was incorrect for remote debuggers. Change-Id: Icd210dbfc9437e9abd2e0c4248e5503129bf6d8b Reviewed-by: hjk <hjk@qt.io>
* Debugger: Improve ABI compatibility matchingOrgad Shaneh2022-09-051-6/+11
| | | | | | | | | | | | | | | | Debugger ABI compatibility is not the same as the implementation in ABI. For instance, GDB can support multiarch targets, so matching the arch is not good enough. Use DebuggerItem::matchTarget and adapt it to consider ABI mismatches as MatchesSomewhat for GDB/LLDB, which are potentially build with multiarch (unfortunately there is no easy way to tell, at least for GDB). Amends commit c04f3a94ea12a40e776b0a2830a984828fbb1401. Fixes: QTCREATORBUG-28020 Change-Id: I555c4e886c641bfdf50ca660eda499c18260f6f4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Debugger: Simplify legacyGdbTargetAbiString handlinghjk2022-09-051-4/+2
| | | | | Change-Id: Iafcd998b8e05e8ce64e0fd2e3cefc4c944374153 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Debugger: Convert to Tr::trhjk2022-07-081-19/+11
| | | | | Change-Id: I5d2475c790851c68f9997ac6af72b5eaca58482d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Debugger: (Re-)Fix start of Android lldb from NDK 23.x on LinuxAlessandro Portale2022-06-171-1/+1
| | | | | | | | | | | | | | | | | | In order to help lldb locate libpython3.9.so, we need to point LD_LIBRARY_PATH to the right lib/ path inside the NDK. Amends: b54bf8ad867e0beddf0fcda6b4deacc3b6a0f7c8 Reason for amend: The "prepend" use-case of Environment::prependOrSet failed due to the undefined separator. Now, use Environment::prependOrSetLibrarySearchPath instead, since that handles the separator and knows the environment variable name. Fixes: QTCREATORBUG-27297 Change-Id: I770a6335a7a26c65d23c930f7d6f9795b3dc52b5 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Replace Environment::size() check by some isValid() functionhjk2022-06-031-1/+1
| | | | | | | More descriptive, and later implementable without full expansion. Change-Id: Ic3b17ea0b07273f292827a7b63e7695b4bd1cf23 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-04-201-0/+7
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/webassembly/webassemblyrunconfiguration.cpp src/tools/processlauncher/launchersockethandler.cpp Change-Id: Iab052af98013aa59282c16f22ae6e9ecb32f50c4
| * Debugger: Fix start of Android lldb from NDK 23.x on LinuxAlesandro Portale2022-04-131-0/+7
| | | | | | | | | | | | | | | | | | | | In order to help lldb locate libpython3.9.so, we need to point LD_LIBRARY_PATH to the right lib/ path inside the NDK. Fixes: QTCREATORBUG-27297 Change-Id: I4c234fabf291dfb5f5240120541897a79cb6933a Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
| * QNX: Fix debugger detectionRafael Roquetto2022-03-091-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QNX gdb binary requires the QNX_TARGET env variable to be set even for codepaths that do not make use of it, namely, when invoking gdb with the --version or --configuration parameters to detect the ABI. Failure to set this variable causes gdb to fail with "QNX environment not set!" instead. This patch works around that by setting a phony QNX_TARGET variable in these occasions. Change-Id: I9f2638c422eb56516b87dde049186579d238de5c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> (cherry picked from commit 88aec120753768959cac7977d802c04dc2c6e526) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | QNX: Fix debugger detectionRafael Roquetto2022-03-071-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QNX gdb binary requires the QNX_TARGET env variable to be set even for codepaths that do not make use of it, namely, when invoking gdb with the --version or --configuration parameters to detect the ABI. Failure to set this variable causes gdb to fail with "QNX environment not set!" instead. This patch works around that by setting a phony QNX_TARGET variable in these occasions. Change-Id: I9f2638c422eb56516b87dde049186579d238de5c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* | QtcProcess: Limit the inclusion of qtcprocess.hJarek Kobus2022-03-021-1/+1
|/ | | | | | | | | | Move the rest of QtcProcess enums to processenums.h. Move ExitCodeInterpreter into processenums.h. Remove superfluous Utils:: prefix. Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Debugger: Set Python env also for ndk-lldbs outside the SDKAlessandro Portale2021-12-061-2/+2
| | | | | | | | | | | | When using an NDK installation which was not installed via an Android SDK manager, we cannot presume that the included lldb binary has a path containing "ndk" or "ndk-bundle". Looking for "/toolchains/llvm/prebuilt/" in the path should detect any ndk-provided lldb. Change-Id: Icbaab0915f5877ca37ee44cbca6cc37360363b5c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/6.0'Eike Ziller2021-11-111-2/+21
|\ | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/theme/theme_mac.mm src/plugins/android/androiddeployqtstep.cpp src/plugins/debugger/lldb/lldbengine.cpp Change-Id: I5f2c62e0bce6c91a53a554b3278dbe23ff7dde36
| * Debugger: Set "PYTHONHOME" for Androids lldb as native pathAlessandro Portale2021-11-101-1/+1
| | | | | | | | | | | | | | | | The correct path separators in this case make the difference beween breaking on a breakpoint or not. Change-Id: Ia33682e559ffe172a571bec6b78b32fca14d98f5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * Debugger: Consolidate search code for python-pathAlessandro Portale2021-11-091-13/+19
| | | | | | | | | | | | | | | | | | Not just to deduplicate/reuse code but also to make make it clear that different places where lldb is called, the same preparations have to be done. Change-Id: I104aca845fd7b42f63443bda2502574f4d28b411 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * Debugger: Fix running android lldbChristian Stenger2021-11-081-2/+15
|/ | | | | | | ..when gathering version information. Change-Id: I99d69de661edad856fe66a045e8e2ee03036dd2c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Remove unneeded includes of QProcess from cpp filesJarek Kobus2021-11-011-1/+0
| | | | | | | | QProcess wasn't used in these files. Change-Id: I24900bcf312eb6ea1ca3bc0c753cebb505ec552b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Debugger: Enable detection of Android Studio's lldb frontendAlessandro Portale2021-10-291-4/+6
| | | | | | | | | | Android Studio (at least on Windows) ships an LLDBFrontend(.exe) which differs in file name and version output, so that the code in DebuggerItem::reinitializeFromFile needs to be tweakd a bit. Fixes: QTCREATORBUG-26504 Change-Id: Ic989a6110e03088148c28a7fe6248e5f836ea2ea Reviewed-by: hjk <hjk@qt.io>
* Debugger: Add commandline to "Unable to determine gdb target ABI" warningv6.0.0-beta1Alessandro Portale2021-10-121-1/+1
| | | | | | | Helps finding out which gdb doesn't want to tell. Change-Id: Iab374f577ee133a3bad576dd425cad5c91391f41 Reviewed-by: hjk <hjk@qt.io>
* Debugger: Remove some uses of FilePath::toFileInfo()hjk2021-08-231-15/+6
| | | | | | Change-Id: I78037741084630fc6852f5805595ec2943db64d2 Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Show output of debugger detectionhjk2021-08-061-2/+6
| | | | | | | | | | | | | ... in tooltip of debugger path lineedit. Helps with cases where necessary libraries are missing. The tooltip is a bit hard to recognize, but as such cases now also are marked in red text there's at least some direct hint that something is not ok. Change-Id: Ic5da8dcb1921a98f91f6eed755fa87ce5feed698 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Debugger: Code cosmeticshjk2021-07-141-8/+8
| | | | | | | Namespaces, names, ... Change-Id: Id0b65585b8849e8bb47d63f6eba1c23b9db1a2c2 Reviewed-by: David Schulz <david.schulz@qt.io>
* Docker: Fix debugger auto-detectionhjk2021-07-141-3/+7
| | | | | | | | Mark detected debuggers as such and give them some bonus to match, overriding other hacks. Change-Id: Iaf4d88fa22dd50e68124b61087d4c742f7a56d0f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* All: Replace most SynchronousProcess by QtcProcesshjk2021-06-231-2/+2
| | | | | Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename QtcProcess::Result::Finished to FinishedWithSuccesshjk2021-06-021-1/+1
| | | | | | | | | | | | To make clear that this is not just any finish. Also change FinishedError to FinishedWithError, to create symmetry. Also adapt enum member description to reality. Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Remove CommandLine argument from QtcProcess::run{,Blocking}hjk2021-05-191-2/+4
| | | | | | | | | | | Makes run() more similar to what start() looks like. Also add some asserts to make sure run() and related functions are only called on SyncronousProcesses, as these are currently the only ones where this works. Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Make process results accessible through QtcProcess objecthjk2021-05-141-8/+7
| | | | | | | | | | | | | | | | The result is fully stored in the object anyway. Using the extra SynchronousProcessResponse structure only causes copies of the data and complicates access on the user side in a lot of cases. The result bits are now also accessible individually. There's obvious room for follow-up changes on the topic, e.g. ShellCommand::runCommand's parameter list could shrink to just a SynchronousProcess parameter. Change-Id: I45aa7eb23832340be06905929280c012e1217263 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Merge {synchronous,qtc}process.{h,cpp} file pairshjk2021-05-101-1/+1
| | | | | | | | Mechanical to prepare merging the actual classes. Adapting #includes. Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* DebuggerItem: Pass environment to debugger probingCristian Adam2021-05-071-3/+5
| | | | | | | | | | | QNX 7.1.0 requires that the QNX specific environment variables are present at the time of running the gdb executable. Without this the QNX Device configuration fails with the: "Configuration already exists or is invalid" Change-Id: I1cb8da58247247ac8248cb613f73e2e28d350e9e Reviewed-by: hjk <hjk@qt.io>
* Debugger: Prevent calling windows lldb on startupDavid Schulz2020-11-241-0/+12
| | | | | | | | | | | The LLVM package on windows contains an LLDB linked against python but misses a python library. Calling this lldb to get the version number results in an ugly error message that python36.dll cannot be found. Use the file version info instead. Fixes: QTCREATORBUG-23848 Change-Id: I6d8e6cac07b427de564eaaedf7de369391aed37e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Drop clang and llvm revision from LLDB version numberhjk2020-09-081-5/+7
| | | | | | | | They are mentioned as separate lines in the lldb --version output for self-build lldb binaries. Change-Id: Ib0d6e46874ad5b576ac20a6aeab823d51571c0f2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Drop Utils::SkipEmptyParts againhjk2020-07-211-1/+1
| | | | | | | | We require Qt 5.14 nowadays. Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* All: Use Utils::SkipEmptyPartshjk2020-06-171-1/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: Some FileName cosmeticshjk2020-04-141-4/+4
| | | | | | | Use {from,to}Variant for settings, and one time fromUserInput is enough. Change-Id: I5774f425a4c775b0d78b87c60eabf7f48d78a082 Reviewed-by: Christian Stenger <christian.stenger@qt.io>