Is it possible to set a python script handler for a signal stop in lldb?

LLDB tutorial tells the way to set a python script handler for a breakpoint. see

But is there a way to set one for a signal stop?

I believe there is no such thing at the moment. It might be
interesting to add one though, to enable "conditional" signal
handling. E.g., when an application handles it's own SIGSEGVs, and you
want to pass those quietly, but you want to stop for real problems
(for some definition of "real").


lldb has "target stop-hook"s that you can use to add LLDB command-line commands to react to any sort of stop. The intent is to also allow Python stop hooks, then you could switch on the thread's stop reason and do signal specific stuff for a signal stop. But nobody has gotten around to adding Python stop hooks yet.