From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31825 invoked by alias); 6 Jul 2010 18:23:03 -0000 Received: (qmail 31814 invoked by uid 22791); 6 Jul 2010 18:23:02 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Jul 2010 18:22:56 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o66IMscE009250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Jul 2010 14:22:54 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o66IMs1V016139; Tue, 6 Jul 2010 14:22:54 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o66IMrJF024353; Tue, 6 Jul 2010 14:22:53 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 2E7493784BE; Tue, 6 Jul 2010 12:22:53 -0600 (MDT) From: Tom Tromey To: gdb-patches@sourceware.org Subject: FYI: update for Python 2.7 Date: Tue, 06 Jul 2010 18:23:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00102.txt.bz2 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 * 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