簡體   English   中英

在iOS模擬器和設備上拋出異常時,Xcode調試器中缺少堆棧跟蹤

[英]Missing stack trace in Xcode debugger when exception is thrown on both iOS simulator and device

當我的應用程序拋出異常時,它會在調試器輸出中輸出以下內容:

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錯誤,但你看到我錯過了什么明顯的東西嗎?

我試過/檢查過的

構建設置:
調試
復制期間剝離調試符號= NO
剝離鏈接產品= NO
優化級別= -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.

好的,發現了這個問題:好吧,不是我,而是喬(一個phillyCocoa成員)......但是因為他不在,所以我會發布他的解決方案。

部署目標設置為4.0,但由於必須在Xcode 4.2中單獨下載4.0調試符號,因此DSYM無效。

2種修復方法:
1.從Xcode首選項安裝4.0的調試符號。
2.將部署目標設置為4.3或更高。

唯一突出的是開發構建應該可能與-O0完全關閉優化。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM