我也刚注意到这一点。似乎在 Xcode 4.1 ( tty /dev/ttys000
)gdb
中是这样开始的:
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
但在 Xcode 4.2 - 否tty /dev/ttys000
:
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
要解决此问题,您可以从命令行 (Terminal.app/iTerm/etc) 执行以下操作:
echo 'tty /dev/ttys000' >> ~/.gdbinit
# Or, put it into the global gdb config:
# echo 'tty /dev/ttys000' >> /etc/gdb.conf
然后重新启动 Xcode,你的退出代码就回来了!
似乎 Xcode 4.2 的 gdb 包装器自 4.1 以来发生了变化
[ 13:29 Jonathan@MacBookPro / ]$ ls -l /Developer/Library/Xcode/PrivatePlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB /Developer-4.2/Library/Xcode/PrivatePlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB
-rwxrwxr-x 1 root admin 351936 Sep 20 13:23 /Developer/Library/Xcode/PrivatePlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB
-rwxrwxr-x 1 root admin 353776 Oct 8 14:21 /Developer-4.2/Library/Xcode/PrivatePlugIns/DebuggerLLDB.ideplugin/Contents/MacOS/DebuggerLLDB
[ 13:33 Jonathan@MacBookPro / ]$ ls -l /Developer/Library/Xcode/PrivatePlugIns/DebuggerGDB.ideplugin/Contents/MacOS/DebuggerGDB /Developer-4.2/Library/Xcode/PrivatePlugIns/DebuggerGDB.ideplugin/Contents/MacOS/DebuggerGDB
-rwxrwxr-x 1 root admin 1976144 Sep 20 13:23 /Developer/Library/Xcode/PrivatePlugIns/DebuggerGDB.ideplugin/Contents/MacOS/DebuggerGDB
-rwxrwxr-x 1 root admin 1948240 Oct 8 14:21 /Developer-4.2/Library/Xcode/PrivatePlugIns/DebuggerGDB.ideplugin/Contents/MacOS/DebuggerGDB