Xcode 4.2 doesn't output code?

Starting with the upgrade to iOS 5 and Xcode 4.2, it seems that Xcode no longer prints "Program ended with exit code: #" at the end of the run. Has anyone else noticed this and is there a way to turn it back on? I have an automatic testing tool that relies on this conclusion to determine if tests pass or not, so it would be very useful to return it.

UPDATE: I examined this in more detail, and this seems to be a deeper problem. It seems that whenever I launch the application, it crashes with a segmentation error on exit. Sometimes this happens just before printing the exit code, sometimes right after that, so the exit code message appears inconsistently. A seg failure message appears in the device console, although there is nothing in the debug output of Xcode.

+4
source share
1 answer

I noticed that too. It seems that in Xcode 4.1 ( tty /dev/ttys000 ) gdb starts as follows:

 This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000 

But in Xcode 4.2 - No tty /dev/ttys000 :

 This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all 

To fix this, you can do the following from the command line (Terminal.app/iTerm/etc):

 echo 'tty /dev/ttys000' >> ~/.gdbinit # Or, put it into the global gdb config: # echo 'tty /dev/ttys000' >> /etc/gdb.conf 

Then restart Xcode and return the exit code!


Xcode 4.2 gdb cover seems to have changed from 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 
+3
source

All Articles