public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: update for Python 2.7
@ 2010-07-06 18:23 Tom Tromey
  2010-07-26 21:28 ` Michael Snyder
  0 siblings, 1 reply; 9+ messages in thread
From: Tom Tromey @ 2010-07-06 18:23 UTC (permalink / raw)
  To: gdb-patches

I am checking this in.

Python 2.7 was recently released.  This patch updates GDB to build
correctly against it.

I built this on my x86 box, with a local Python 2.7 build.
I ran the gdb.python tests with the new gdb without errors.

Tom

2010-07-06  Tom Tromey  <tromey@redhat.com>

	* configure, config.in: Rebuild.
	* configure.ac (HAVE_LIBPYTHON2_7): New define.
	* python/python-internal.h: Handle HAVE_LIBPYTHON2_7.

diff --git a/gdb/configure.ac b/gdb/configure.ac
index 7ddb67f..bfe1803 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -792,7 +792,9 @@ else
                        ${python_includes}, "${python_libs} -lpython2.4")
     fi
   fi
-  if test "${have_libpython}" = python2.6; then
+  if test "${have_libpython}" = python2.7; then
+    AC_DEFINE(HAVE_LIBPYTHON2_7, 1, [Define if Python 2.7 is being used.])
+  elif test "${have_libpython}" = python2.6; then
     AC_DEFINE(HAVE_LIBPYTHON2_6, 1, [Define if Python 2.6 is being used.])
   elif test "${have_libpython}" = python2.5; then
     AC_DEFINE(HAVE_LIBPYTHON2_5, 1, [Define if Python 2.5 is being used.])
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 5bd2a4b..5e0ed18 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -47,6 +47,9 @@ typedef int Py_ssize_t;
 #elif HAVE_LIBPYTHON2_6
 #include "python2.6/Python.h"
 #include "python2.6/frameobject.h"
+#elif HAVE_LIBPYTHON2_7
+#include "python2.7/Python.h"
+#include "python2.7/frameobject.h"
 #else
 #error "Unable to find usable Python.h"
 #endif

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-07-30 15:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-06 18:23 FYI: update for Python 2.7 Tom Tromey
2010-07-26 21:28 ` Michael Snyder
2010-07-26 21:38   ` Mike Frysinger
2010-07-26 22:11     ` Michael Snyder
2010-07-27 16:10       ` Tom Tromey
2010-07-28 17:06         ` Michael Snyder
2010-07-29 21:04           ` Tom Tromey
2010-07-30  0:03             ` Doug Evans
2010-07-30 15:59               ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).