Exception Breakpoints - LLDB Results vs. GDB

偶尔善良 提交于 2019-12-09 22:53:25

问题


I have searched for topics specifically to this question but have not found anything close to my experience. Forgive me if I have overlooked the answer. I am familiar with GDB and exception points, break points, etc... but the following test of debugging in GDB vs LDB left me without a plausible response.

Global Test Values

  • Xcode 4.2.1
  • New Single Window Project (Default template w/no changes)
  • Arc Enabled
  • Storyboard Enabled

Case 1 - GDB Debugger

Exception Breakpoint Values:

  • Exception - All
  • Break on - Throw
  • Arguments - None
  • Result - No Crash

Case 2 - LLDB Debugger

Exception Breakpoint Values:

  • Exception - All
  • Break on - Throw
  • Arguments - None
  • Result - Crash with Sigbart & machine code; no discernible stack trace

Case 3 - LLDB Debugger

Exception Breakpoint Values:

  • Exception - Objective-C
  • Break on - Throw
  • Arguments - None
  • Result - No Crash

Case 4 - LLDB Debugger

Exception Breakpoint Values:

  • Exception - C++
  • Break on - Throw
  • Arguments - None
  • Result - Crash with Sigbart and machine code; no discernible stack trace

Question: Should I simply assume that selecting "Objective-C" as an Exception option is a safe way to go, or am I potentially ignoring a glaring issue? It is my understanding that as of Xcode 4.2.1, it is recommended I use LLDB and would like to. However, I am curious about the results above.

Thanks in advance to all community responses!


回答1:


Thanks to the thoughtful suggestion of @Mike K, I was able to address my concern of potentially ignoring a glaring issue.

When I reproduce the above mentioned scenario on an actual device iPhone/iPad, Cases 2 and 4 using LLDB no longer produce a crash and the application runs as intended. The issue seems to be limited to the simulator.

I am interested in the root cause of the problem on the simulator for posterity's sake, but am quite happy that I can proceed using LLDB as intended.



来源:https://stackoverflow.com/questions/8997547/exception-breakpoints-lldb-results-vs-gdb

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