From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28772 invoked by alias); 23 Nov 2010 12:42:52 -0000 Received: (qmail 28761 invoked by uid 22791); 23 Nov 2010 12:42:51 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Nov 2010 12:42:48 +0000 Received: (qmail 24754 invoked from network); 23 Nov 2010 12:42:46 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Nov 2010 12:42:46 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA/Python] Fix procfs.c build failure on 32bit solaris (_FILE_OFFSET_BITS) Date: Tue, 23 Nov 2010 12:42:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.33-29-realtime; KDE/4.4.5; x86_64; ; ) Cc: Joel Brobecker References: <1290474834-1945-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1290474834-1945-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201011231242.44422.pedro@codesourcery.com> X-IsSubscribed: yes 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-11/txt/msg00348.txt.bz2 On Tuesday 23 November 2010 01:13:54, Joel Brobecker wrote: > This is a bit ugly... > > A recent change introduced the include of "python-internal.h" from > inside breakpoint.h. This in turn affected procfs.c: How hard would it be to get rid of the need to include python-internal.h in any header? It's included by breakpoint.h for PyObject, /* With a Python scripting enabled GDB, store a reference to the Python object that has been associated with this breakpoint. This is always NULL for a GDB that is not script enabled. It can sometimes be NULL for enabled GDBs as not all breakpoint types are tracked by the Python scripting API. */ PyObject *py_bp_object; Given that we only need to hold a pointer to this, thus the PyObject need not be complete at this point, can we forward declare PyObject instead somehow? If not, can we perhaps come up with a wrapper type that itself can be forward declared? Or fallback to void* if nothing else cleaner is possible? The advantage would be that python-internal.h would then only be included in the specific modules that require it, in other words, it would be moved to breakpoint.c. WDYT? -- Pedro Alves