mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Refactor & Impl: JuiceAgent and init function and AddToClassLoader
This commit is contained in:
1 parent
bad147d898
commit
34cb16d385
6 files changed
+195
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <libagent.hpp>
|
||||
|
||||
inline bool check_env(JuiceAgent::Agent& agent) {
|
||||
if (agent.get_jvm() == nullptr) {
|
||||
PLOGE << "Failed to get JavaVM instance";
|
||||
return false;
|
||||
}
|
||||
if (agent.get_jvmti() == nullptr) {
|
||||
PLOGE << "Failed to get JVMTI environment";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user