Commit f3906560 authored by swift_gan's avatar swift_gan

tweak deCompile api

parent de263333
......@@ -244,7 +244,7 @@ Java_com_swift_sandhook_SandHook_compileMethod(JNIEnv *env, jclass type, jobject
extern "C"
JNIEXPORT jboolean JNICALL
Java_com_swift_sandhook_SandHook_deCompileMethod(JNIEnv *env, jclass type, jobject member) {
Java_com_swift_sandhook_SandHook_deCompileMethod(JNIEnv *env, jclass type, jobject member, jboolean disableJit) {
if (member == NULL)
return JNI_FALSE;
......@@ -253,6 +253,10 @@ Java_com_swift_sandhook_SandHook_deCompileMethod(JNIEnv *env, jclass type, jobje
if (method == nullptr)
return JNI_FALSE;
if (disableJit) {
method->disableCompilable();
}
if (method->isCompiled()) {
SandHook::StopTheWorld stopTheWorld;
if (SDK_INT >= ANDROID_N) {
......
......@@ -308,7 +308,7 @@ public class SandHook {
public static native void ensureMethodCached(Method hook, Method backup);
public static native boolean compileMethod(Member member);
public static native boolean deCompileMethod(Member member);
public static native boolean deCompileMethod(Member member, boolean disableJit);
public static native boolean canGetObject();
public static native Object getObjectNative(long thread, long address);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment