【发布时间】:2017-03-08 09:35:57
【问题描述】:
当一个进程在 python 脚本中崩溃或被杀死时,我想做一些事情。
但是,我无论如何都无法知道 lldb 何时停止进程。
我试图捕捉 SIGKILL 信号但没有用。
import lldb
import signal
def debug(sig, frame):
print "stop!\n"
def listen():
signal.signal(signal.SIGKILL, debug) # Register handler
我发现我们可以使用它来处理断点命中,但它无法处理我的情况。
def breakpoint_function_wrapper(frame, bp_loc, dict):
谁有一些解决方案?
【问题讨论】: