当我的应用程序抛出异常时,它会在调试器输出中打印以下内容:
First throw call stack:
(0x310f88bf 0x3829d1e5 0x31e76015 0x31e7640d 0x31e764c5 0x9e903 0x9edfb 0x32b15d55 0x32b20e8d 0x310cb2dd 0x3104e4dd 0x3104e3a5 0x33c7cfed 0x330c0743 0x3267 0x3220)
软件堆栈:
Lion 10.7.2中的Xcode 4.2(未安装Xcode 4.1)
我倾向于这是一个Xcode错误,但你看到我错过了什么明显的东西吗?
构建设置:
调试
复制期间剥离调试符号=否
剥离链接产品=否
优化级别= -O0和-Os
默认隐藏的符号= YES和NO
编译器= LLVM 3.0和LLVM GCC 4.2
方案:
Debugger = GDB和LLDB
清洗:
清洁
清理构建文件夹
删除派生数据目录(从组织者中删除)
设备:
iOS 5模拟器
iOS 5 iPhone 4
iOS 5 iPhone 3Gs
随机:
我最初安装了Xcode 4.1和4.2时遇到了这个问题,因此卸载了两个并重新安装了4.2
尝试使用相同结果的不同项目。
当摆弄断点时,我在异常之前的调试器输出中看到了这一点:
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.
答案 0 :(得分:6)
好的,发现了这个问题:不是我,而是Joe(一个phillyCocoa成员)......但是因为他不在,所以我会发布他的解决方案。
部署目标设置为4.0,但由于必须在Xcode 4.2中单独下载4.0调试符号,因此DSYM无效。
2种修复方法:
1.从Xcode首选项安装4.0的调试符号
2.将部署目标设置为4.3或更高。
答案 1 :(得分:1)
唯一突出的是,开发版本可能应该与-O0
完全关闭优化。