异常断点(相当于gdb的catch throw) [英] Breakpoint on exceptions (equivalent of gdb's catch throw)
问题描述
catch throw
,我在lldb中找不到一个等价物文档。在Xcode中,您可以设置一个Exception断点(View> Navigators> Show Breakpoint Navigator,点击+断点列表窗口的底部添加一个新的断点)。
如果使用命令行lldb,在 __ cxa_throw
对于C ++异常throws, objc_exception_throw
为Objective-C异常throws。
对于所有c ++例外: break set -E C ++
。
I am trying to use lldb for c++ debugging and I want to halt if an exception is thrown, like gdb's catch throw
, and I cannot find an equivalent in the lldb documentation.
In Xcode, you can set an Exception breakpoint (View > Navigators > Show Breakpoint Navigator, hit the + button in the bottom of the breakpoint list window to add a new breakpoint).
If you're using command line lldb, put a breakpoint on __cxa_throw
for C++ exception throws, objc_exception_throw
for Objective-C exception throws.
For all c++ exceptions: break set -E C++
.
这篇关于异常断点(相当于gdb的catch throw)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!