gdb/gdb-rhbz1822715-fix-python-deprecation.patch
qinyu ac0d605f19 update gdb to 9.2
Signed-off-by: qinyu <qinyu16@huawei.com>
2020-07-24 11:52:10 +08:00

17 lines
498 B
Diff

diff --git a/gdb/python/python.c b/gdb/python/python.c
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1618,7 +1618,12 @@ do_start_initialization ()
#endif
Py_Initialize ();
+#if PY_VERSION_HEX < 0x03090000
+ /* PyEval_InitThreads became deprecated in Python 3.9 and will
+ be removed in Python 3.11. Prior to Python 3.7, this call was
+ required to initialize the GIL. */
PyEval_InitThreads ();
+#endif
#ifdef IS_PY3K
gdb_module = PyImport_ImportModule ("_gdb");