/usr/share/doc/python2.7/README.debug is in python2.7-dbg 2.7.3-0ubuntu3.9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | Contents of the python2.7-dbg package
-------------------------------------
For debugging python and extension modules, you may want to add the contents
of /usr/share/doc/python2.7/gdbinit to your ~/.gdbinit file.
python2.7-dbg contains two sets of packages:
- debugging symbols for the standard python2.7 build. When this package
is installed, gdb will automatically load up the debugging symbols
from it when debugging python2.7 or one of the included extension
modules.
- a separate python2.7-dbg binary, configured --with-pydebug, enabling the
additional debugging code to help debug memory management problems.
For the latter, all extension modules have to be recompiled to
correctly load with an pydebug enabled build.
Debian and Ubuntu specific changes to the debug interpreter
-----------------------------------------------------------
The python2.4 and python2.5 packages in Ubuntu feisty are modified to
first look for extension modules under a different name.
normal build: foo.so
debug build: foo_d.so foo.so
This naming schema allows installation of the extension modules into
the same path (The naming is directly taken from the Windows builds
which already uses this naming scheme).
See https://wiki.ubuntu.com/PyDbgBuilds for more information.
Using the python-dbg builds
---------------------------
* Call the python-dbg or the pythonX.Y-dbg binaries instead of the
python or pythonX.Y binaries.
* Debugging a third party extension requires the availabilty of the
extension built for the debug interpreter. For an extension `foo'
make sure that the `python-foo-dbg' package is installed, or else
the interpreter falls back to the extension for the normal build.
The error on fallback is expected.
* Properties of the debug build are described in
/usr/share/doc/python2.7/SpecialBuilds.txt.gz.
The debug interpreter is built with Py_DEBUG defined.
* From SpecialBuilds.txt: This is what is generally meant by "a debug
build" of Python. Py_DEBUG implies LLTRACE, Py_REF_DEBUG,
Py_TRACE_REFS, and PYMALLOC_DEBUG (if WITH_PYMALLOC is enabled).
In addition, C assert()s are enabled (via the C way: by not defining
NDEBUG), and some routines do additional sanity checks inside
"#ifdef Py_DEBUG" blocks.
|