@@ -691,8 +691,8 @@ void write_lldb_prep_cmds(AMDeviceRef device, CFURLRef disk_app_url) {
691
691
692
692
NSString * python_command = @" fruitstrap_" ;
693
693
if (device_id != NULL ) {
694
- python_file_path = [python_file_path stringByAppendingString: [NSString stringWithUTF8String: device_id]];
695
- python_command = [python_command stringByAppendingString: [NSString stringWithUTF8String: device_id]];
694
+ python_file_path = [python_file_path stringByAppendingString: [[ NSString stringWithUTF8String: device_id] stringByReplacingOccurrencesOfString: @" - " withString: @" _ " ]];
695
+ python_command = [python_command stringByAppendingString: [[ NSString stringWithUTF8String: device_id] stringByReplacingOccurrencesOfString: @" - " withString: @" _ " ]];
696
696
}
697
697
python_file_path = [python_file_path stringByAppendingString: @" .py" ];
698
698
@@ -704,7 +704,7 @@ void write_lldb_prep_cmds(AMDeviceRef device, CFURLRef disk_app_url) {
704
704
CFDataRef cmds_data = CFStringCreateExternalRepresentation (NULL , cmds, kCFStringEncodingUTF8 , 0 );
705
705
NSString * prep_cmds_path = [NSString stringWithFormat: PREP_CMDS_PATH, tmpUUID];
706
706
if (device_id != NULL ) {
707
- prep_cmds_path = [prep_cmds_path stringByAppendingString: [NSString stringWithUTF8String: device_id]];
707
+ prep_cmds_path = [prep_cmds_path stringByAppendingString: [[ NSString stringWithUTF8String: device_id] stringByReplacingOccurrencesOfString: @" - " withString: @" _ " ]];
708
708
}
709
709
FILE *out = fopen ([prep_cmds_path UTF8String ], " w" );
710
710
fwrite (CFDataGetBytePtr (cmds_data), CFDataGetLength (cmds_data), 1 , out);
@@ -963,7 +963,7 @@ void launch_debugger(AMDeviceRef device, CFURLRef url) {
963
963
lldb_shell = [NSString stringWithFormat: LLDB_SHELL, prep_cmds];
964
964
965
965
if (device_id != NULL ) {
966
- lldb_shell = [lldb_shell stringByAppendingString: [NSString stringWithUTF8String: device_id]];
966
+ lldb_shell = [lldb_shell stringByAppendingString: [[ NSString stringWithUTF8String: device_id] stringByReplacingOccurrencesOfString: @" - " withString: @" _ " ]];
967
967
}
968
968
969
969
int status = system ([lldb_shell UTF8String ]); // launch lldb
@@ -1002,7 +1002,7 @@ void launch_debugger_and_exit(AMDeviceRef device, CFURLRef url) {
1002
1002
NSString * prep_cmds = [NSString stringWithFormat: PREP_CMDS_PATH, tmpUUID];
1003
1003
NSString * lldb_shell = [NSString stringWithFormat: LLDB_SHELL, prep_cmds];
1004
1004
if (device_id != NULL ) {
1005
- lldb_shell = [lldb_shell stringByAppendingString: [NSString stringWithUTF8String: device_id]];
1005
+ lldb_shell = [lldb_shell stringByAppendingString: [[ NSString stringWithUTF8String: device_id] stringByReplacingOccurrencesOfString: @" - " withString: @" _ " ]];
1006
1006
}
1007
1007
1008
1008
int status = system ([lldb_shell UTF8String ]); // launch lldb
0 commit comments