diff --git a/gdb-fix-python37-breakage.patch b/gdb-fix-python37-breakage.patch deleted file mode 100644 index 74b3d19..0000000 --- a/gdb-fix-python37-breakage.patch +++ /dev/null @@ -1,68 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Paul Koning -Date: Fri, 8 Jun 2018 13:26:36 -0400 -Subject: gdb-fix-python37-breakage.patch - -FileName: gdb-fix-python37-breakage.patch - -;; Fix build breakage with Python 3.7 -;; RHBZ #1577396 - -Fix build issue with Python 3.7 - -Originally reported in -https://bugzilla.redhat.com/show_bug.cgi?id=1577396 -- gdb build fails -with Python 3.7 due to references to a Python internal function whose -declaration changed in 3.7. - -gdb/ChangeLog -2018-06-08 Paul Koning - - PR gdb/23252 - - * python/python.c (do_start_initialization): - Avoid call to internal Python API. - (init__gdb_module): New function. - -diff --git a/gdb/python/python.c b/gdb/python/python.c ---- a/gdb/python/python.c -+++ b/gdb/python/python.c -@@ -1810,6 +1810,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 () - { -@@ -1850,6 +1861,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 -@@ -1859,9 +1873,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/gdb-pahole-python2.patch b/gdb-pahole-python2.patch deleted file mode 100644 index b3722b1..0000000 --- a/gdb-pahole-python2.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py -index e08eaf5..56c1737 100644 ---- a/gdb/python/lib/gdb/command/pahole.py -+++ b/gdb/python/lib/gdb/command/pahole.py -@@ -55,19 +55,19 @@ It prints the type and displays comments showing where holes are.""" - fieldsize = 8 * ftype.sizeof - - # TARGET_CHAR_BIT -- print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "") -+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))), - bitpos = bitpos + fieldsize - - if ftype.code == gdb.TYPE_CODE_STRUCT: - self.pahole (ftype, level + 1, field.name) - else: -- print (' ' * (2 + 2 * level), end = "") -+ print (' ' * (2 + 2 * level)), - print ('%s %s' % (str (ftype), field.name)) - - if level == 0: - self.maybe_print_hole(bitpos, 8 * type.sizeof) - -- print (' ' * (14 + 2 * level), end = "") -+ print (' ' * (14 + 2 * level)), - print ('} %s' % name) - - def invoke (self, arg, from_tty): -@@ -75,7 +75,7 @@ It prints the type and displays comments showing where holes are.""" - type = type.strip_typedefs () - if type.code != gdb.TYPE_CODE_STRUCT: - raise (TypeError, '%s is not a struct type' % arg) -- print (' ' * 14, end = "") -+ print (' ' * 14), - self.pahole (type, 0, '') - - Pahole()