public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: FYI: update for Python 2.7
Date: Tue, 06 Jul 2010 18:23:00 -0000	[thread overview]
Message-ID: <m3k4p8cvwj.fsf@fleche.redhat.com> (raw)

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

             reply	other threads:[~2010-07-06 18:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06 18:23 Tom Tromey [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3k4p8cvwj.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).