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>
This way the user doesn't have to manually register lldb.exe
Change-Id: Id0a19de0962d8ba47a66a8d1909dfe2eb5ca0a6f
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
- 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>
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>
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>
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 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 c04f3a94ea.
Fixes: QTCREATORBUG-28020
Change-Id: I555c4e886c641bfdf50ca660eda499c18260f6f4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
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: b54bf8ad86
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>
More descriptive, and later implementable without full expansion.
Change-Id: Ic3b17ea0b07273f292827a7b63e7695b4bd1cf23
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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 88aec12075)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
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>
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>
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>
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>
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>
... 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>
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>
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>
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>
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>
Mechanical to prepare merging the actual classes.
Adapting #includes.
Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
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>
Use {from,to}Variant for settings, and one time fromUserInput is enough.
Change-Id: I5774f425a4c775b0d78b87c60eabf7f48d78a082
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This patch adds debugger integration from the KEIL uVision IDE:
* http://www2.keil.com/mdk5/uvision/
This IDE has the uVision Socket Interface (UVSC) that allows
to the applications configuration, building and debugging:
* http://www.keil.com/appnotes/docs/apnt_198.asp
Besides, it provides a binary client libraries for Windows, which
are implements some API which we are use in this patch.
Currently implemented the following features:
* Enumeration of a stack frames.
* Enumeration of a threads (tasks).
* Registers view (read/write).
* Local variables view (read/write).
* Watchers view (read/write).
* Disassembler view.
* Current location marker.
* Break-points.
* Step-in.
* Step-over.
* Step-out.
* Step-by-instruction.
* Start/stop/pause/continue debugger.
* Auto-detection for the installed uVision instances (as debuggers).
* Wizard for choosing and configuring of the UVSC debug providers.
At this moment added support only for the 32-bit ARM devices, provided
by the STMicroelectronics:
https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html
For this are implemented two debugger providers:
* Simulator - allow to simulate the target device.
* ST-Link v2 - it is a HW debugger.
This implementation tested only with the QBS using the following
target boards:
* NUCLEO-F767ZI (based on STM32F767ZIT6 MCU).
* STM32F4DISCOVERY (based on STM32F407VG MCU).
* STM32F103x (based on STM32F103C8T6 MCU).
A more detailed information about this patch can be found in a
bug-tracker.
Fixes: QTCREATORBUG-23426
Change-Id: Ie36a1f7430b56c33d6665cc35e43fe9bd95d28f1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>