Skip to content

Commit

Permalink
Merge pull request #18 from davidlt/IB/CMSSW_6_2_X/fc18_armv7hl_gcc480
Browse files Browse the repository at this point in the history
IB/CMSSW_6_2_X/fc18_armv7hl_gcc480: GDB update.
  • Loading branch information
davidlt committed May 5, 2013
2 parents 1f2b820 + 2207ae4 commit b8faf46
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
52 changes: 52 additions & 0 deletions gdb-7.6-fix-pythonhome.patch
Original file line number Diff line number Diff line change
@@ -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 ();

4 changes: 2 additions & 2 deletions gdb.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b8faf46

Please sign in to comment.