Lack of stack trace in the Xcode debugger when an exception is thrown on both the iOS simulator and the device

When my application throws an exception, it outputs the following output to the debugger:

First throw call stack: (0x310f88bf 0x3829d1e5 0x31e76015 0x31e7640d 0x31e764c5 0x9e903 0x9edfb 0x32b15d55 0x32b20e8d 0x310cb2dd 0x3104e4dd 0x3104e3a5 0x33c7cfed 0x330c0743 0x3267 0x3220) 

Software Stack:
Xcode 4.2 in Lion 10.7.2 (Xcode 4.1 is not installed)

I am inclined to this, this is an Xcode error, but do you see something obvious that I missed?

What have I tried / tested

Build Settings:
Debug
Debugging debugging characters during copy = NONE
Ribbon-related product = NO
Optimization Level = -O0 and-Os
Characters hidden by default = YES and NO
Compiler = LLVM 3.0 and LLVM GCC 4.2

Scheme:
Debugger = GDB and LLDB

Cleaning:
Clean
Empty build folder
Delete source data directory (delete from organizer)

Devices:
iOS 5 Simulator
iOS 5 iPhone 4
iOS 5 iPhone 3Gs

Random:
I initially ran into this problem when installing both Xcode 4.1 and 4.2, so I only uninstalled and reinstalled 4.2

Tried with different projects with the same results.

When playing with breakpoints, I see this on the debugger output before an exception:

 Catchpoint 36 (throw)Catchpoint 37 (catch)Pending breakpoint 2 - "__cxa_begin_catch" resolved warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame. warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame. Catchpoint 36 (exception thrown).warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame. warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame. 
+6
source share
2 answers

Well, I found the problem: well, not me, but Joe (a phillyCocoa member) ... But since he is not on SO, I will post my solution.

The deployment target was set to 4.0, but since 4.0 debugging characters must be loaded separately in Xcode 4.2, DSYM is not valid.

2 ways to fix:
1. Set the debugging symbols for 4.0 from the Xcode settings. 2. Set the deployment target to 4.3 or higher.

+6
source

The only thing sticking out is that in development builds, optimization with -O0 should probably be turned off.

+1
source

Source: https://habr.com/ru/post/899534/


All Articles