This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Make python/lib/gdb and submodules proper Python modules
Hi,
(Sorry for the resend again!)
On Sep 7, 2012, at 2:18 AM, Doug Evans wrote:
> On Sun, Sep 2, 2012 at 8:44 PM, Khoo Yit Phang <khooyp@cs.umd.edu> wrote:
>>
>> One caveat about this patch is that the data-directory must contain the
>> gdb module, otherwise Python will not be fully initialized (with a warning)
>> and Python support will be very limited (only the _gdb module will be
>> available).
>
> One thing that comes to mind is that, regardless of implementation
> details, we can't easily get rid of gdb.PYTHONDIR because it's part of
> the API gdb provides.
> [grep PYTHONDIR doc/gdb.texinfo]
It's pretty easy to restore PYTHONDIR if necessary, by computing it from gdb.__file__. I'm more concerned about the caveat about requiring the initial data-directory for Python. Is it common to change the data-directory, other than for testing GDB?
Yit
September 7, 2012