debuging in shared library (using gdb or ddd)
Michael P. Reilly
arcege at shore.net
Mon Nov 8 20:04:58 CET 1999
> How can I debug a shared library module imported into python
> with gdb or ddd debugger ?
I often start gdb with python, run the program getting an interactive
shell, import the appropriate module(s) or package(s). Then I interrupt
the process (cntl-C), which is captured first by GDB, not Python, set
my breakpoints and finally "cont"inue the interactive interpreter:
$ gdb python
>>> import foobar
(gdb) break foobar_function
There may be some configurations where this won't work (threads, etc.),
but I've used it on a lot of systems this way.
More information about the Python-list