This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/python:1/2] Add support for --with-pythondir.


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]