mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-22 20:18:57 +08:00
[sim] Get simulated app PID as int instead of NSNumber.
Related to http://hipbyte.myjetbrains.com/youtrack/issue/RM-365 Fixes http://hipbyte.myjetbrains.com/youtrack/issue/RM-371
This commit is contained in:
2
NEWS
2
NEWS
@@ -4,6 +4,8 @@
|
||||
2 times faster.
|
||||
* Improved where compares the value in a block where returns float.
|
||||
(Ex Array#sort{|a,b| return float_object }). 2 times faster.
|
||||
* [iOS] Fixed a regression related to the sim launcher changes for Xcode 5.1
|
||||
that broke `rake simulator debug=1`.
|
||||
|
||||
= RubyMotion 2.18 =
|
||||
|
||||
|
||||
@@ -1211,9 +1211,9 @@ lldb_commands_file(int pid, NSString *app_path)
|
||||
}
|
||||
|
||||
if (debug_mode == DEBUG_GDB) {
|
||||
NSNumber *pidNumber = ((id (*)(id, SEL))objc_msgSend)(session,
|
||||
int pidNumber = ((int (*)(id, SEL))objc_msgSend)(session,
|
||||
@selector(simulatedApplicationPID));
|
||||
if (pidNumber == nil || ![pidNumber isKindOfClass:[NSNumber class]]) {
|
||||
if (pidNumber == 0) {
|
||||
fprintf(stderr, "*** Cannot get simulated application PID\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -1227,12 +1227,13 @@ lldb_commands_file(int pid, NSString *app_path)
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:gdb_path]) {
|
||||
gdb_task = [[RMTask launchedTaskWithLaunchPath:gdb_path
|
||||
arguments:[NSArray arrayWithObjects:@"--arch", @"i386", @"-q",
|
||||
@"--pid", [pidNumber description], @"-x", gdb_commands_file(), nil]] retain];
|
||||
@"--pid", [NSString stringWithFormat:@"%d", pidNumber], @"-x",
|
||||
gdb_commands_file(), nil]] retain];
|
||||
}
|
||||
else if ([[NSFileManager defaultManager] fileExistsAtPath:lldb_path]) {
|
||||
gdb_task = [[RMTask launchedTaskWithLaunchPath:lldb_path
|
||||
arguments:[NSArray arrayWithObjects:@"-a", @"i386",
|
||||
@"-s", lldb_commands_file([pidNumber intValue], nil), nil]]
|
||||
@"-s", lldb_commands_file(pidNumber, nil), nil]]
|
||||
retain];
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user