comparing with http://hg.python.org/devguide searching for changes changeset: 613:03b3d8fb60de tag: tip user: cben@users.sf.net date: Mon Mar 18 17:34:44 2013 -0700 summary: Explain how to [auto-]load python-gdb.py. diff -r 7a707540391e -r 03b3d8fb60de gdb.rst --- a/gdb.rst Fri Mar 15 22:34:23 2013 +0200 +++ b/gdb.rst Mon Mar 18 17:34:44 2013 -0700 @@ -19,9 +19,17 @@ In gdb 7, support for `extending gdb with Python `_ was -added. When CPython is built you will notice a ``python-gdb.py`` file in the -root directory of your checkout. Read the module docstring for details on how -to use the file to enhance gdb for easier debugging of a CPython process. +added. When CPython is built you will notice a ``python-gdb.py`` file in the +root directory of your checkout. gdb automatically looks for this file when +running ``gdb python``, but you may need to add this line to ``~/.gdbinit``:: + + add-auto-load-safe-path + +(or just ``add-auto-load-safe-path /``) otherwise recent gdb versions will +`refuse `_ +to auto-load it. You can also load it manually with:: + + source python-gdb.py This is what a backtrace looks like (truncated) when this extension is enabled::