From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12766 invoked by alias); 10 Jun 2009 15:49:08 -0000 Received: (qmail 12756 invoked by uid 22791); 10 Jun 2009 15:49:07 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.17.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Jun 2009 15:49:01 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.1/8.13.1) with ESMTP id n5AFmw80017031 for ; Wed, 10 Jun 2009 15:48:58 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5AFmvoA2879668 for ; Wed, 10 Jun 2009 17:48:57 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5AFmvJa013029 for ; Wed, 10 Jun 2009 17:48:57 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n5AFmuG9013008; Wed, 10 Jun 2009 17:48:56 +0200 Message-Id: <200906101548.n5AFmuG9013008@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 10 Jun 2009 17:48:56 +0200 Subject: Re: [02/15] Python interpreter callback functions To: tromey@redhat.com Date: Wed, 10 Jun 2009 15:49:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: from "Tom Tromey" at Jun 09, 2009 11:59:07 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2009-06/txt/msg00257.txt.bz2 Tom Tromey wrote: > I think this is ok as a default, but ideally the various Python > methods would take an optional architecture argument. That would mean > having some Python representation of the architecture. Right. > I think any place that acquires the GIL should probably also set the > architecture. I noticed that gdbpy_new_objfile was not touched in > your patch; there may be other places as well. Perhaps all this work > could be done by a single convenience function, to make it harder to > forget in the future. Right, I overlooked gdbpy_new_objfile. I'll fix that. I can also merge acquiring/releasing the GIL into make_cleanup_python_env .. > If we had some notion of the "host architecture", then stuff like > builtin_type_pyint could just use that instead. Those defines really > represent types on the host. Note that even with my patch set applied, there are currently still some limitations on mixing and matching architectures. For example, you still cannot pass a value of arch A as argument to an inferior function call of arch B. These restrictions could presumably be lifted over time, but for now, you'd have to deal with them if Python values were of a different arch from the target ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com