Skip to content

Commit fa88a73

Browse files
committed
Fixes #20 - lldb startup super-slow unless ios-deploy.c is edited to match exact xcode version
1 parent 8315062 commit fa88a73

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ios-deploy.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* log enable -v -f /Users/vargaz/gdb-remote.log gdb-remote all
2828
*/
2929
#define LLDB_PREP_CMDS CFSTR("\
30-
platform select remote-ios --sysroot {home}/Library/Developer/Xcode/iOS\\ DeviceSupport/7.0.4\\ (11B554a)/Symbols/\n\
30+
platform select remote-ios --sysroot {symbols_path}\n\
3131
target create \"{disk_app}\"\n\
3232
script fruitstrap_device_app=\"{device_app}\"\n\
3333
script fruitstrap_connect_url=\"connect://127.0.0.1:12345\"\n\
@@ -407,14 +407,15 @@ CFStringRef copy_disk_app_identifier(CFURLRef disk_app_url) {
407407
}
408408

409409
void write_lldb_prep_cmds(AMDeviceRef device, CFURLRef disk_app_url) {
410+
CFStringRef ds_path = copy_device_support_path(device);
411+
CFStringRef symbols_path = CFStringCreateWithFormat(NULL, NULL, CFSTR("'%@/Symbols'"), ds_path);
412+
410413
CFMutableStringRef cmds = CFStringCreateMutableCopy(NULL, 0, LLDB_PREP_CMDS);
411414
CFRange range = { 0, CFStringGetLength(cmds) };
412415

413-
CFStringRef user_home_path = CFStringCreateWithCString(NULL, getenv("HOME"), kCFStringEncodingASCII);
414-
CFStringFindAndReplace(cmds, CFSTR("{home}"), user_home_path, range, 0);
416+
CFStringFindAndReplace(cmds, CFSTR("{symbols_path}"), symbols_path, range, 0);
415417
range.length = CFStringGetLength(cmds);
416418

417-
CFStringRef ds_path = copy_device_support_path(device);
418419
CFStringFindAndReplace(cmds, CFSTR("{ds_path}"), ds_path, range, 0);
419420
range.length = CFStringGetLength(cmds);
420421

@@ -492,7 +493,6 @@ void write_lldb_prep_cmds(AMDeviceRef device, CFURLRef disk_app_url) {
492493

493494
CFRelease(cmds);
494495
if (ds_path != NULL) CFRelease(ds_path);
495-
CFRelease(user_home_path);
496496
CFRelease(bundle_identifier);
497497
CFRelease(device_app_url);
498498
CFRelease(device_app_path);

0 commit comments

Comments
 (0)