[rtems-source-builder commit] GDB: Prefer Python 3 over 2
Sebastian Huber
sebh at rtems.org
Mon Mar 21 07:54:36 UTC 2022
Module: rtems-source-builder
Branch: master
Commit: 571a182d4aa3be967791c8c715cedbd2a88b3b91
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=571a182d4aa3be967791c8c715cedbd2a88b3b91
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Mar 17 12:49:20 2022 +0100
GDB: Prefer Python 3 over 2
This fixes the build of a recent GDB version:
gdb/python/py-micmd.c: In function 'int micmdpy_uninstall_command(micmdpy_object*)':
gdb/python/py-micmd.c:430:20: error: 'PyDict_GetItemWithError' was not declared in this scope
PyObject *curr = PyDict_GetItemWithError (mi_cmd_dict.get (),
^~~~~~~~~~~~~~~~~~~~~~~
---
source-builder/config/gdb-common-1.cfg | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg
index 397d44d..c7f3955 100644
--- a/source-builder/config/gdb-common-1.cfg
+++ b/source-builder/config/gdb-common-1.cfg
@@ -42,7 +42,7 @@
# 2. Does the version of gdb specify a version of python that must be
# used. Override with '%define gdb-python-version python2'.
#
-# 3. Search for 'python2' and if not found search for 'python3'.
+# 3. Search for 'python3' and if not found search for 'python2'.
#
%if %{defined gdb-python2}
%define gdb-enable-python %{gdb_python2}
@@ -53,9 +53,9 @@
%if %{defined gdb-python-version}
%define gdb-enable-python %(command -v %{gdb-python-version} || true)
%else
- %define gdb-enable-python %(command -v python2 || true)
+ %define gdb-enable-python %(command -v python3 || true)
%if %{gdb-enable-python} == %{nil}
- %define gdb-enable-python %(command -v python3 || true)
+ %define gdb-enable-python %(command -v python2 || true)
%endif
%if %{gdb-enable-python} == %{nil}
%define gdb-enable-python %(command -v python || true})
More information about the vc
mailing list