diff --git a/insight-8.1-python37.patch b/insight-8.1-python37.patch new file mode 100644 index 0000000..a759911 --- /dev/null +++ b/insight-8.1-python37.patch @@ -0,0 +1,45 @@ +X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=gdb%2Fpython%2Fpython.c;h=20fc674f20ad6cd686976eaa879f7325ea39b17f;hp=1805c90628455be92b6788be2a531f302cef7fe9;hb=aeab512851bf6ed623d1c6c4305b6ce05e51a10c;hpb=5045b3d78903d1f6faa4cb511fa801e50dfacf48 + +diff --git a/gdb/python/python.c b/gdb/python/python.c +index 1805c90..20fc674 100644 +--- a/gdb/python/python.c ++++ b/gdb/python/python.c +@@ -1667,6 +1667,17 @@ finalize_python (void *ignore) + restore_active_ext_lang (previous_active); + } + ++#ifdef IS_PY3K ++/* This is called via the PyImport_AppendInittab mechanism called ++ during initialization, to make the built-in _gdb module known to ++ Python. */ ++PyMODINIT_FUNC ++init__gdb_module (void) ++{ ++ return PyModule_Create (&python_GdbModuleDef); ++} ++#endif ++ + static bool + do_start_initialization () + { +@@ -1707,6 +1718,9 @@ do_start_initialization () + remain alive for the duration of the program's execution, so + it is not freed after this call. */ + Py_SetProgramName (progname_copy); ++ ++ /* Define _gdb as a built-in module. */ ++ PyImport_AppendInittab ("_gdb", init__gdb_module); + #else + Py_SetProgramName (progname.release ()); + #endif +@@ -1716,9 +1730,7 @@ do_start_initialization () + PyEval_InitThreads (); + + #ifdef IS_PY3K +- gdb_module = PyModule_Create (&python_GdbModuleDef); +- /* Add _gdb module to the list of known built-in modules. */ +- _PyImport_FixupBuiltin (gdb_module, "_gdb"); ++ gdb_module = PyImport_ImportModule ("_gdb"); + #else + gdb_module = Py_InitModule ("_gdb", python_GdbMethods); + #endif diff --git a/insight.spec b/insight.spec index c6d0605..02a0d26 100644 --- a/insight.spec +++ b/insight.spec @@ -20,7 +20,7 @@ Name: insight Version: %(echo %{ver} | tr - .)%{?snap:.%{snap}} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Graphical debugger based on GDB License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Url: https://www.sourceware.org/insight/ @@ -129,6 +129,7 @@ Patch152: gdb-linux_perf-bundle.patch Patch153: gdb-libexec-add-index.patch Patch154: gdb-archer.patch Patch155: gdb-vla-intel-fix-print-char-array.patch +Patch156: insight-8.1-python37.patch %description @@ -205,6 +206,7 @@ GDB version 8.x. %patch153 -p1 %patch154 -p1 %patch155 -p1 +%patch156 -p1 #------------------------------------------------------------------------------- @@ -405,11 +407,15 @@ rm -rf "${RPM_BUILD_ROOT}" #------------------------------------------------------------------------------- %changelog +#------------------------------------------------------------------------------- + +* Wed Jun 27 2018 Patrick Monnerat 8.1.50.20180216-4 +- Patch "python37" for Python version 3.7 compatibility. + https://sourceware.org/bugzilla/show_bug.cgi?id=23252 + * Tue Jun 19 2018 Miro HronĨok - 8.1.50.20180216-3 - Rebuilt for Python 3.7 -#------------------------------------------------------------------------------- - * Wed Mar 7 2018 Patrick Monnerat 8.1.50.20180216-2 - Patch "serialbaud" change set/show baud rate command. https://sourceware.org/git/?p=insight.git;a=commit;h=a2b5b98