在过去,我经常使用将gdb附加到正在运行的Python进程并使用py-*扩展进行debugging的可能性。 但是,自Debian Jessie以来,这不再起作用,而是抛出了MemoryError 。
重现步骤:
debian/jessie64盒子创build一个Vagrant机器 sudo apt-get install gdb python-dbg echo "raw_input()" > test.py"并运行python test.py gdb -p <processe's PID>附加 py-bt或任何其他py-*命令 结果是:
(gdb) py-bt Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x12: Error occurred in Python command: Cannot access memory at address 0x12
当使用debian/wheezy64作为基础框时:
#10 Frame 0xf2faf0, for file test.py, line 1, in <module> () raw_input()
任何人遇到和解决这个问题?