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