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