
Alexander Shchapov
Assuming you want to benefit from pyhton-readable traces we need a py-bt
extension and debug symbols:
sudo apt-get install gdb python2.7-dbg
Attaching to a running process (you must be either owner of this process or root):
gdb python
gdb> attach <pid>
Note: process is stopped the moment you attach.
py-list
. Current line is shown as >
:gdb> py-list
1427 Takes length to receive and repeatedly calls recv until able to
1428 return a buffer of that length, raising ConnectionFailure on error.
1429 """
1430 message = EMPTY
1431 while length:
>1432 chunk = sock_info.sock.recv(length)
1433 if chunk == EMPTY:
1434 raise ConnectionFailure("connection closed")
1435 length -= len(chunk)
1436 message += chunk
1437 return message
info threads
thread apply all py-list
thread <number>
py-up
and py-down
py-locals
, py-globals
and py-print
c