X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/8ad1528b69655e99ce77d52df90fadeb07b1153c..a621ae76cc8981ecf39b8f992f5dde39a03846f3:/Mach/Inject.cpp diff --git a/Mach/Inject.cpp b/Mach/Inject.cpp index 29d1848..1df9be3 100644 --- a/Mach/Inject.cpp +++ b/Mach/Inject.cpp @@ -1,5 +1,5 @@ /* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2010 Jay Freeman (saurik) + * Copyright (C) 2009-2012 Jay Freeman (saurik) */ /* GNU Lesser General Public License, Version 3 {{{ */ @@ -47,6 +47,10 @@ void InjectLibrary(pid_t pid) { Baton *baton(reinterpret_cast(local)); baton->__pthread_set_self = &__pthread_set_self; + baton->pthread_create = &pthread_create; + + baton->mach_thread_self = &mach_thread_self; + baton->thread_terminate = &thread_terminate; baton->dlerror = &dlerror; baton->dlsym = &dlsym; @@ -114,7 +118,7 @@ void InjectLibrary(pid_t pid) { mach_msg_type_number_t read(count); _krncall(thread_get_state(thread, flavor, reinterpret_cast(&state), &read)); - _assert(count == count); + _assert(read == count); #if defined(__arm__) state.__r[0] = data;