From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17372 invoked by alias); 28 May 2010 16:08:41 -0000 Received: (qmail 17283 invoked by uid 22791); 28 May 2010 16:08:27 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 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; Fri, 28 May 2010 16:08:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 74C182BAC2E; Fri, 28 May 2010 12:08:21 -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 yoYBgvqrHhQK; Fri, 28 May 2010 12:08:21 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 34A7E2BAABC; Fri, 28 May 2010 12:08:21 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 95B4DF58FA; Fri, 28 May 2010 09:08:18 -0700 (PDT) Date: Fri, 28 May 2010 17:20:00 -0000 From: Joel Brobecker To: Doug Evans Cc: tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: [RFA/python:1/2] Add support for --with-pythondir. Message-ID: <20100528160818.GN3019@adacore.com> References: <1274918921-23200-1-git-send-email-brobecker@adacore.com> <1274918921-23200-2-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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-05/txt/msg00683.txt.bz2 > Support doesn't have to be included in the patch, but IWBN to have a > plan for how to support .so's associated with gdb python modules in a > way that follows Python's scheme: i.e. .py*'s go in > $prefix/lib/pythonX.Y and .so's go in > $exec_prefix/lib/pythonX.Y/lib-dynload [i.e. architecture independent > files go in $prefix and architecture dependent files go in > $exec_prefix]. > If the plan is to add --with-python-sodir [or some such] if/when it's > needed, great. Or if the plan is to decide to just not support it, > that's probably ok too. I'd just like to put in the thought now. I wasn't personally thinking about .so modules for GDB. Do you have any example in mind where it would be more useful for a user to use a .so rather than a .py? I can see several options: (a) We do without .so support in GDB; (b) We plan for eventual .so support, with the location adjustable through a configure switch (--with-python-sodir); (c) Embed the gdb python modules inside the python install by default (in site-packages), with a configure switch that allows us to put the library elsewhere. Option (c) is really radical, and I don't know that it'll really fly. But introduces the idea that the GDB python library layout mimic the one that python uses. Option (b) is a good backup for option (a). So, in a way, (a) and (b) are the same option. I'd go with that. > Also, do we want to name this --with-gdb-pythondir? [and do we want to > rename --with-python to --with-gdb-python?] I think that --with-python is a fine name, although now that I think of it, it might have been more consistent to name it with-python-prefix. I don't think that we should name it with a "gdb" in it, because this is not GDB's python library, but rather the prefix where python is installed. I am not particularly attached to --with-gdb-pythondir, on the other hand, but I don't seem to be able to find a better name. Perhaps, if we want the gdb python lib to mimick the layout of a typical python install, then --with-gdb-python-prefix might be better (?). -- Joel