alf wrote:
> Hi,
>
> I have a two fold question:
>       -how to attach the debugger to running multi threaded program
>       -the objective is to find an infinite loop in one of threads which
> makes the whole thingy going craze (100%CPU)
>
> The program itself is not easy, in fact quite hude and sometimes it
> takes hours to get to that infloop state.

On linux:

% python
>>> import os
>>> os.getpid()
54321

Now, in another shell,
% gdb
(gdb) attach 54321

If you want debugging symbols, recompile python with -g.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to