2

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!

User97693321
  • 3,336
  • 7
  • 45
  • 69
Ethan Mateja
  • 201
  • 2
  • 9
  • 1
    does it make a difference whether you're running on a device or in the simulator? i seem to recall running into non-objc (ie. c++) exceptions on startup when running in the simulator. – Mike K Jan 25 '12 at 05:06
  • Thanks @MikeK for the suggestion! You are correct. When reproducing the test on a device, there is no longer a crash when "Exception: All" or "Exception: C++" are selected. I am still curious about why the crash occurs in the simulator for posterity. >. – Ethan Mateja Jan 25 '12 at 17:38

1 Answers1

0

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.

Ethan Mateja
  • 201
  • 2
  • 9