MemoryError在Jessie上使用gdb的Python扩展

在过去,我经常使用将gdb附加到正在运行的Python进程并使用py-*扩展进行debugging的可能性。 但是,自Debian Jessie以来,这不再起作用,而是抛出了MemoryError

重现步骤:

  • 使用debian/jessie64盒子创build一个Vagrant机器
  • 在框中sudo apt-get install gdb python-dbg
  • 创build一个testing文件echo "raw_input()" > test.py"并运行python test.py
  • 用gdb 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() 

任何人遇到和解决这个问题?