From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29667 invoked by alias); 7 Apr 2009 18:24:50 -0000 Received: (qmail 29633 invoked by uid 22791); 7 Apr 2009 18:24:45 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_34 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Apr 2009 18:24:37 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2ADE72BABF7; Tue, 7 Apr 2009 14:24:36 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3aTmAZujC3+u; Tue, 7 Apr 2009 14:24:36 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 47E732BABF5; Tue, 7 Apr 2009 14:24:34 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BCBABF5A13; Tue, 7 Apr 2009 11:24:31 -0700 (PDT) Date: Tue, 07 Apr 2009 18:24:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: Python pretty-printing [1/6] Message-ID: <20090407182431.GA7535@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) 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-04/txt/msg00126.txt.bz2 Hi Tom, I hope this isn't too late a review to bring this up. I looked at this series of patches last Friday, but I didn't have an internet connection back then. > 2009-01-25 Sergio Durigan Junior > Tom Tromey > > * configure, config.in: Regenerate. > * configure.ac: Support for relocatable GDB datadir. Add > --with-pythondir. > * python/python.c (_initialize_python): Set pythondir or datadir > as needed. Update sys.path. > * maint.c (_initialize_maint_cmds): Add "maint set gdb_datadir". > * defs.h (gdb_datadir): Declare. > * main.c (gdb_datadir): New global. > (captured_main): Initialize gdb_datadir. I'm wondering whether we could implement this slightly differently. Right now, this patch adds code that is conditional on wether some macros are defined or not. For instance: > +#ifdef PYTHONDIR > + PyModule_AddStringConstant (gdb_module, "pythondir", PYTHONDIR); > +#else > + if (gdb_datadir) > + PyModule_AddStringConstant (gdb_module, "datadir", gdb_datadir); > +#endif Can we change that, for instance by assuming that we always have PYTHONDIR, and that by default, configure will set to the datadir? I was going to comment on the ..._RELOCATABLE macro, but I see that we're already using that idiom for at least the system gdbinit file. -- Joel