lldb: Breakpoint on exceptions (equivalent of gdb's catch throw)

南楼画角 提交于 2019-12-02 20:01:27
Jason Molenda

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++.

Use break set -E c++ to break on all exceptions and break set -F std::range_error to break on a specific exception.

I think breakpoint set -w <boolean> is the correct answer, you can use help breakpoint set to see the document.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!