From 2207ae46e44efe17a058e3dcd67a62e126d36cdb Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Sun, 5 May 2013 04:34:59 -0400 Subject: [PATCH] gdb: update version to 7.6 Updates GDB version to 7.6. Signed-off-by: David Abdurachmanov --- gdb-7.6-fix-pythonhome.patch | 52 ++++++++++++++++++++++++++++++++++++ gdb.spec | 4 +-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 gdb-7.6-fix-pythonhome.patch diff --git a/gdb-7.6-fix-pythonhome.patch b/gdb-7.6-fix-pythonhome.patch new file mode 100644 index 00000000000..3b6ea2168da --- /dev/null +++ b/gdb-7.6-fix-pythonhome.patch @@ -0,0 +1,52 @@ +diff --git a/gdb/python/python.c b/gdb/python/python.c +index 67d06e5..07d2d6e 100644 +--- a/gdb/python/python.c ++++ b/gdb/python/python.c +@@ -1527,47 +1527,6 @@ message == an error message without a stack will be printed."), + &user_show_python_list); + + #ifdef HAVE_PYTHON +-#ifdef WITH_PYTHON_PATH +- /* Work around problem where python gets confused about where it is, +- and then can't find its libraries, etc. +- NOTE: Python assumes the following layout: +- /foo/bin/python +- /foo/lib/pythonX.Y/... +- This must be done before calling Py_Initialize. */ +- progname = concat (ldirname (python_libdir), SLASH_STRING, "bin", +- SLASH_STRING, "python", NULL); +-#ifdef IS_PY3K +- oldloc = setlocale (LC_ALL, NULL); +- setlocale (LC_ALL, ""); +- progsize = strlen (progname); +- if (progsize == (size_t) -1) +- { +- fprintf (stderr, "Could not convert python path to string\n"); +- return; +- } +- progname_copy = PyMem_Malloc ((progsize + 1) * sizeof (wchar_t)); +- if (!progname_copy) +- { +- fprintf (stderr, "out of memory\n"); +- return; +- } +- count = mbstowcs (progname_copy, progname, progsize + 1); +- if (count == (size_t) -1) +- { +- fprintf (stderr, "Could not convert python path to string\n"); +- return; +- } +- setlocale (LC_ALL, oldloc); +- +- /* Note that Py_SetProgramName expects the string it is passed to +- remain alive for the duration of the program's execution, so +- it is not freed after this call. */ +- Py_SetProgramName (progname_copy); +-#else +- Py_SetProgramName (progname); +-#endif +-#endif +- + Py_Initialize (); + PyEval_InitThreads (); + diff --git a/gdb.spec b/gdb.spec index 5bcee4e8c3c..695eb9d64bc 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,6 +1,6 @@ -### RPM external gdb 7.5.1 +### RPM external gdb 7.6 Source: http://ftp.gnu.org/gnu/%{n}/%{n}-%{realversion}.tar.bz2 -Patch0: gdb-7.5-fix-pythonhome +Patch0: gdb-7.6-fix-pythonhome Requires: python ncurses zlib %prep