1. defaults write com.apple.Xcode PBXGDBDebuggerLogToFile YES
  2. defaults write com.apple.Xcode PBXGDBDebuggerLogFileName <filepath>
  3.  
  4. /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin
  5.  
  6. #!/bin/sh
  7.  
  8. /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin- $* | tee -a $HOME/tmp/xcode-gdb.log 2>&1