diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2011-08-09 12:45:40 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2011-08-09 12:45:40 +0000 |
commit | 5e239b84ac58a9edfc0d942ef751a78aac4c007b (patch) | |
tree | 33a9ccb9dcc77350b509b5b8f49b6484a9125976 /gdb/python/python.c | |
parent | 7fe550fc4986f19a766650a76551a4ff4985ef5c (diff) | |
download | binutils-5e239b84ac58a9edfc0d942ef751a78aac4c007b.zip binutils-5e239b84ac58a9edfc0d942ef751a78aac4c007b.tar.gz binutils-5e239b84ac58a9edfc0d942ef751a78aac4c007b.tar.bz2 |
2011-08-09 Phil Muldoon <pmuldoon@redhat.com>
* python/lib/gdb/__init__.py: Auto-load files in command and
function directories.
* python/python.c (finish_python_initialization): Use
os.path.join.
* python/lib/gdb/command/pretty_printers.py: Self register
command.
* NEWS: Document auto-loading.
2011-08-09 Phil Muldoon <pmuldoon@redhat.com>
* gdb.texinfo (Python): Document command and function
auto-loading.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 16c0a6e..03edce9 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1302,13 +1302,13 @@ def GdbSetPythonDirectory (dir):\n\ sys.path.insert (0, gdb.PYTHONDIR)\n\ \n\ # Tell python where to find submodules of gdb.\n\ - gdb.__path__ = [gdb.PYTHONDIR + '/gdb']\n\ + gdb.__path__ = [os.path.join (gdb.PYTHONDIR, 'gdb')]\n\ \n\ # The gdb module is implemented in C rather than in Python. As a result,\n\ # the associated __init.py__ script is not not executed by default when\n\ # the gdb module gets imported. Execute that script manually if it\n\ # exists.\n\ - ipy = gdb.PYTHONDIR + '/gdb/__init__.py'\n\ + ipy = os.path.join (gdb.PYTHONDIR, 'gdb', '__init__.py')\n\ if os.path.exists (ipy):\n\ execfile (ipy)\n\ \n\ |