From 5175ae097f5834989d79f6fa52d49bee21f56e27 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 14 Aug 2014 07:55:59 +0200 Subject: [PATCH] [rhel] Adjust the previous patch for compilation on older GCCs. --- gdb-python-gil.patch | 5 +++-- gdb.spec | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gdb-python-gil.patch b/gdb-python-gil.patch index d839b6b..b2d9de9 100644 --- a/gdb-python-gil.patch +++ b/gdb-python-gil.patch @@ -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, diff --git a/gdb.spec b/gdb.spec index a073c81..1870402 100644 --- a/gdb.spec +++ b/gdb.spec @@ -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 - 7.8-18.fc21 +- [rhel] Adjust the previous patch for compilation on older GCCs. + * Wed Aug 13 2014 Jan Kratochvil - 7.8-17.fc21 - Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).