|
27 | 27 | * log enable -v -f /Users/vargaz/gdb-remote.log gdb-remote all
|
28 | 28 | */
|
29 | 29 | #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\ |
31 | 31 | target create \"{disk_app}\"\n\
|
32 | 32 | script fruitstrap_device_app=\"{device_app}\"\n\
|
33 | 33 | script fruitstrap_connect_url=\"connect://127.0.0.1:12345\"\n\
|
@@ -407,14 +407,15 @@ CFStringRef copy_disk_app_identifier(CFURLRef disk_app_url) {
|
407 | 407 | }
|
408 | 408 |
|
409 | 409 | 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 | + |
410 | 413 | CFMutableStringRef cmds = CFStringCreateMutableCopy(NULL, 0, LLDB_PREP_CMDS);
|
411 | 414 | CFRange range = { 0, CFStringGetLength(cmds) };
|
412 | 415 |
|
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); |
415 | 417 | range.length = CFStringGetLength(cmds);
|
416 | 418 |
|
417 |
| - CFStringRef ds_path = copy_device_support_path(device); |
418 | 419 | CFStringFindAndReplace(cmds, CFSTR("{ds_path}"), ds_path, range, 0);
|
419 | 420 | range.length = CFStringGetLength(cmds);
|
420 | 421 |
|
@@ -492,7 +493,6 @@ void write_lldb_prep_cmds(AMDeviceRef device, CFURLRef disk_app_url) {
|
492 | 493 |
|
493 | 494 | CFRelease(cmds);
|
494 | 495 | if (ds_path != NULL) CFRelease(ds_path);
|
495 |
| - CFRelease(user_home_path); |
496 | 496 | CFRelease(bundle_identifier);
|
497 | 497 | CFRelease(device_app_url);
|
498 | 498 | CFRelease(device_app_path);
|
|
0 commit comments