Add support for gdb.PYTHONDIR as $gdb_datadir/python.
authorJoel Brobecker <brobecker@gnat.com>
Thu, 24 Jun 2010 22:52:04 +0000 (22:52 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 24 Jun 2010 22:52:04 +0000 (22:52 +0000)
commitb14285f60edd8d072778b3d6d07d0e1dd0fb52c0
tree457d04e36b0c817e18602761a5af9b7f90e37881
parentfd60dc691fb51f108b1e74025e4a2751dced8d32
Add support for  gdb.PYTHONDIR as $gdb_datadir/python.

Python scripts to be used by GDB can be stored in that directory,
and will be automatically found by the interpreter when importing them.
This patch also sets up <gdb_pythondir>/gdb as the directory where gdb
submodules can be stored.  For now, there is nothing there, but it can
now be added easily without further code changes.

gdb/ChangeLog:
2010-06-24  Joel Brobecker  <brobecker@adacore.com>

        * python/python.c (_initialize_python): Add new "constant"
        PYTHONDIR in gdb module.  Insert this path at the head of
        sys.path. Set gdb.__path__ to gdb.PYTHONDIR + '/gdb' and
        exec its __init__.py script if it exists in that directory.
gdb/ChangeLog
gdb/python/python.c
This page took 0.026773 seconds and 4 git commands to generate.