-
Notifications
You must be signed in to change notification settings - Fork 0
/
Callbacks.h
32 lines (27 loc) · 1.27 KB
/
Callbacks.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef ET2_CALLBACKS_H_
#define ET2_CALLBACKS_H_
#include "ClassTable.h"
#include <jvmti.h>
#include <jni.h>
#include <unordered_map>
typedef std::unordered_map<long, std::pair<const std::string, const std::string> > MethodTable;
extern bool isReady;
extern MethodTable methodTable;
extern ClassTable classTable, fieldTable;
void JNICALL loadProxyClass(jvmtiEnv *jvmti, JNIEnv *jni);
void JNICALL onClassFileLoad(jvmtiEnv *jvmti,
JNIEnv *jni,
jclass class_being_redefined,
jobject loader,
const char *class_name,
jobject protection_domain,
jint class_data_len,
const unsigned char *class_data,
jint *new_class_data_len,
unsigned char **new_class_data);
void JNICALL onMethodEntry(jvmtiEnv *jvmti, JNIEnv *jni, jthread th, jmethodID method);
void JNICALL onMethodExit(jvmtiEnv *jvmti, JNIEnv *jni, jthread th, jmethodID method,
jboolean was_popped_by_exception, jvalue return_value);
void JNICALL onVMInit(jvmtiEnv *jvmti, JNIEnv *jni, jthread th);
void JNICALL flushBuffers(jvmtiEnv *jvmti, JNIEnv *jni);
#endif