From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27691 invoked by alias); 9 Jun 2009 17:59:21 -0000 Received: (qmail 27680 invoked by uid 22791); 9 Jun 2009 17:59:21 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Jun 2009 17:59:13 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n59HxAZt024710; Tue, 9 Jun 2009 13:59:10 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n59Hx8Es030119; Tue, 9 Jun 2009 13:59:09 -0400 Received: from opsy.redhat.com (vpn-12-99.rdu.redhat.com [10.11.12.99]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n59Hx7sj015424; Tue, 9 Jun 2009 13:59:08 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 2DB8D888077; Tue, 9 Jun 2009 11:59:07 -0600 (MDT) To: "Ulrich Weigand" Cc: gdb-patches@sourceware.org Subject: Re: [02/15] Python interpreter callback functions References: <200906091515.n59FFU04027588@d12av02.megacenter.de.ibm.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Tue, 09 Jun 2009 17:59:00 -0000 In-Reply-To: <200906091515.n59FFU04027588@d12av02.megacenter.de.ibm.com> (Ulrich Weigand's message of "Tue\, 9 Jun 2009 17\:15\:30 +0200 \(CEST\)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) 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: 2009-06/txt/msg00231.txt.bz2 >>>>> "Ulrich" == Ulrich Weigand writes: Ulrich> If there's a more elegant way of passing this sort of Ulrich> environmental information through the Python interpreter, I'd Ulrich> appreciate any hints from the Python experts ;-) 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. 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. 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. Tom