From 512e741f8b1f2b5bd074e8cf8e2a7a1fb75c04f7 Mon Sep 17 00:00:00 2001 From: Henrik Nilsson Date: Sat, 1 Jun 2013 00:27:31 +0200 Subject: [PATCH] Use xcode-select to locate gdb binary. Gdb command change from finish to continue and quit (from @HenrikNilsson) --- ios-deploy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ios-deploy.c b/ios-deploy.c index c82dde0..5095736 100644 --- a/ios-deploy.c +++ b/ios-deploy.c @@ -12,7 +12,7 @@ #define APP_VERSION "1.0" #define FDVENDOR_PATH "/tmp/ios-deploy-remote-debugserver" #define PREP_CMDS_PATH "/tmp/ios-deploy-gdb-prep-cmds" -#define GDB_SHELL "/Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin --arch armv7 -q -x " PREP_CMDS_PATH +#define GDB_SHELL "`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin --arch armv7 -q -x " PREP_CMDS_PATH // approximation of what Xcode does: #define GDB_PREP_CMDS CFSTR("set mi-show-protections off\n\ @@ -37,7 +37,9 @@ set inferior-auto-start-cfm off\n\ set sharedLibrary load-rules dyld \".*libobjc.*\" all dyld \".*CoreFoundation.*\" all dyld \".*Foundation.*\" all dyld \".*libSystem.*\" all dyld \".*AppKit.*\" all dyld \".*PBGDBIntrospectionSupport.*\" all dyld \".*/usr/lib/dyld.*\" all dyld \".*CarbonDataFormatters.*\" all dyld \".*libauto.*\" all dyld \".*CFDataFormatters.*\" all dyld \"/System/Library/Frameworks\\\\\\\\|/System/Library/PrivateFrameworks\\\\\\\\|/usr/lib\" extern dyld \".*\" all exec \".*\" all\n\ sharedlibrary apply-load-rules all\n\ - set inferior-auto-start-dyld 1") + set inferior-auto-start-dyld 1\n\ + continue\n\ + quit\n") typedef struct am_device * AMDeviceRef; int AMDeviceSecureTransferPath(int zero, AMDeviceRef device, CFURLRef url, CFDictionaryRef options, void *callback, int cbarg);