ios – Xcode 4.2不输出退出代码?
发布时间:2020-12-14 17:29:47 所属栏目:百科 来源:网络整理
导读:自从更新到iOS 5和 Xcode 4.2后,似乎 Xcode在运行完成后不再打
自从更新到iOS 5和
Xcode 4.2后,似乎
Xcode在运行完成后不再打印“程序以退出代码结束:#”.有没有人注意到这一点,有没有办法再次启用它?我有一个自动化的测试工具,它依赖于这个输出来确定测试是否通过,因此将其恢复是非常有帮助的.
更新:我更详细地研究了这一点,这似乎是一个更深层次的问题.似乎每当我运行一个应用程序时,它会在退出时因分段错误而崩溃.有时这会在打印退出代码之前发生,有时会在之后发生,这就是退出代码消息不一致的原因. seg故障消息出现在设备的控制台中,尽管Xcode调试输出中没有任何内容. 解决方法
我也注意到了这一点.似乎在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 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |