From: "Paul Pluzhnikov" <ppluzhnikov@google.com>
To: "Pedro Alves" <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org, archer@sourceware.org
Subject: Re: Make GDB build with python 2.4 again.
Date: Sun, 19 Oct 2008 22:47:00 -0000 [thread overview]
Message-ID: <8ac60eac0810191546x2a69de5bw7ed413b298b6fb55@mail.gmail.com> (raw)
In-Reply-To: <200810192118.18369.pedro@codesourcery.com>
On Sun, Oct 19, 2008 at 1:18 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> I'm checking in the attached fix. I get 95 expected passes with
> both 2.4 and 2.5.
Meanwhile, on 'archer-tromey-python':
$ git show 083493c09e01a8e67057b890689883ddbd6bc830
commit 083493c09e01a8e67057b890689883ddbd6bc830
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date: Mon Oct 13 15:54:49 2008 -0700
2008-10-13 Paul Pluzhnikov <ppluzhnikov@google.com>
* python/python-internal.h: Fix 64-bit compilation with python2.4
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 5896907..207d3e4 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -33,8 +33,11 @@
#if HAVE_LIBPYTHON2_4
#include "python2.4/Python.h"
-/* Py_ssize_t is not defined until 2.5. */
-typedef Py_intptr_t Py_ssize_t;
+/* Py_ssize_t is not defined until 2.5.
+ Logical type for Py_ssize_t is Py_intptr_t, but that fails in 64-bit
+ compilation due to several apparent mistakes in python2.4 API, so we
+ use 'int' instead. */
+typedef int Py_ssize_t;
#elif HAVE_LIBPYTHON2_5
#include "python2.5/Python.h"
#elif HAVE_LIBPYTHON2_6
Note that in current gdb/python sources, additional changes
are required for python2.4 if Py_ssize_t isn't fixed as above ...
> 2008-10-19 Pedro Alves <pedro@codesourcery.com>
>
> * python/python-value.c (value_object_methods)
> (value_object_as_number, value_object_as_mapping): Move to bottom
> of file.
Why?
Thanks,
--
Paul Pluzhnikov
next prev parent reply other threads:[~2008-10-19 22:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-19 20:18 Pedro Alves
2008-10-19 22:47 ` Paul Pluzhnikov [this message]
2008-10-19 23:17 ` Pedro Alves
2008-10-19 23:43 ` Tom Tromey
2008-10-20 0:06 ` Pedro Alves
2008-10-20 0:14 ` Tom Tromey
2008-10-20 0:27 ` Pedro Alves
2008-10-20 0:38 ` 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=8ac60eac0810191546x2a69de5bw7ed413b298b6fb55@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=archer@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/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