[rhel] Adjust the previous patch for compilation on older GCCs.

This commit is contained in:
Jan Kratochvil 2014-08-14 07:55:59 +02:00
parent 0d2fda651f
commit 5175ae097f
2 changed files with 7 additions and 3 deletions

View File

@ -31,7 +31,7 @@ diff -dup -ruNp gdb-7.8-orig/gdb/python/python-internal.h gdb-7.8/gdb/python/pyt
diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
--- gdb-7.8-orig/gdb/python/python.c 2014-08-13 22:04:14.164441273 +0200
+++ gdb-7.8/gdb/python/python.c 2014-08-13 22:07:20.895643867 +0200
@@ -620,14 +620,18 @@ execute_gdb_command (PyObject *self, PyO
@@ -620,14 +620,19 @@ execute_gdb_command (PyObject *self, PyO
{
const char *arg;
PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
@ -43,7 +43,8 @@ diff -dup -ruNp gdb-7.8-orig/gdb/python/python.c gdb-7.8/gdb/python/python.c
+ static char *keywords[] = {"command", "from_tty", "to_string",
+ "release_gil", NULL };
char *result = NULL;
+ PyThreadState *state;
+ /* Initialize it just to avoid a GCC false warning. */
+ PyThreadState *state = NULL;
- if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!", keywords, &arg,
+ if (! PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!O!", keywords, &arg,

View File

@ -26,7 +26,7 @@ Version: 7.8
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 17%{?dist}
Release: 18%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
Group: Development/Debuggers
@ -1310,6 +1310,9 @@ then
fi
%changelog
* Thu Aug 14 2014 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.8-18.fc21
- [rhel] Adjust the previous patch for compilation on older GCCs.
* Wed Aug 13 2014 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.8-17.fc21
- Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).