This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [patch] [python] Make GDB buildable on python without threads.
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Project Archer <archer at sourceware dot org>
- Date: Mon, 15 Dec 2008 16:33:37 -0800
- Subject: Re: [patch] [python] Make GDB buildable on python without threads.
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;t=1229387620; bh=waF2W60szsLGYtZV5F9+3i4YyBA=;h=DomainKey-Signature:MIME-Version:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding; b=YEttL6xQBMetDETbOxPORAHH1WiuaPLnFjXwnNTpPNQbOI+PsSxNwpfyOz/2c//cHdu2CiUDXGJ05+8qnbnauQ==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns;h=mime-version:in-reply-to:references:date:message-id:subject:from:to:cc:content-type:content-transfer-encoding;b=xsVqoPUGOO36I17AH/shR/2gJ4hHfbScvdOz1004/VFwEhhwkl1UzPvzdB27DFz3ba2xyxttcJzBV2rq1aeAUw==
- References: <8ac60eac0812151610l4dac662v327cd6714dd4f021@mail.gmail.com> <m3k5a1vug7.fsf@fleche.redhat.com>
On Mon, Dec 15, 2008 at 4:23 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
>
> Paul> This is because my Python 2.4.5 was configured with --without-threads.
>
> Is this one you built yourself?
> Or from a distro?
My distro is 32-bit, and I build 64-bit GDB, so I built this
Python myself.
> I'm curious to know how widespread this is...
>
> Paul> +#if WITH_THREAD /* If Python was built with thread support. */
> Paul> PyEval_ReleaseLock ();
> Paul> +#endif
>
> Instead of this, please put a new #define into python-internal.h, next
> to the others. Thanks.
Committed as below and pushed.
Thanks,
--
Paul Pluzhnikov
2008-12-15 Paul Pluzhnikov <ppluzhnikov@google.com>
* python/python-internal.h (PyEval_ReleaseLock): New define.
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index e35d9cb..7e56784 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -55,6 +55,7 @@ typedef int Py_ssize_t;
#define PyEval_InitThreads() 0
#define PyThreadState_Swap(ARG) (ARG)
#define PyEval_InitThreads() 0
+#define PyEval_ReleaseLock() 0
#endif
#include "command.h"