forked from qt-creator/qt-creator
Debugger: Require at least Python 3.7
This is somewhat arbitrary as I don't want to bisect down to what is exactly needed, and this affects only a warning. Python 3.7 was released 2018-06-27 and is out of support since 2020-06-27 and security fixes up to 2023-06-06, so most people should already have much newer setups. [ChangeLog][Debugger] Require Python 3.7 as minimum for GDB support Change-Id: I433956365965144a7b8e11bbca7d76e0bf25cf69 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
\section1 GDB Versions
|
||||
|
||||
Use GDB 7.5, or later, with the Python scripting extension and Python version
|
||||
3.5, or later.
|
||||
3.7, or later.
|
||||
|
||||
For remote debugging using GDB and GDB server, the minimum supported version
|
||||
of GDB server on the target \l{glossary-device}{device} is 7.0.
|
||||
|
@@ -1511,16 +1511,18 @@ void GdbEngine::handlePythonSetup(const DebuggerResponse &response)
|
||||
GdbMi data = response.data;
|
||||
watchHandler()->addDumpers(data["dumpers"]);
|
||||
m_pythonVersion = data["python"].toInt();
|
||||
if (m_pythonVersion < 20700) {
|
||||
if (m_pythonVersion < 30700) {
|
||||
int pythonMajor = m_pythonVersion / 10000;
|
||||
int pythonMinor = (m_pythonVersion / 100) % 100;
|
||||
QString out = "<p>"
|
||||
+ Tr::tr("The selected build of GDB supports Python scripting, "
|
||||
"but the used version %1.%2 is not sufficient for "
|
||||
"%3. Supported versions are Python 2.7 and 3.x.")
|
||||
"%3. Python %4 or later is required.")
|
||||
.arg(pythonMajor)
|
||||
.arg(pythonMinor)
|
||||
.arg(QGuiApplication::applicationDisplayName());
|
||||
.arg(QGuiApplication::applicationDisplayName())
|
||||
.arg("3.7");
|
||||
|
||||
showStatusMessage(out);
|
||||
AsynchronousMessageBox::critical(Tr::tr("Execution Error"), out);
|
||||
}
|
||||
|
Reference in New Issue
Block a user