MCPcopy Create free account
hub / github.com/cretz/stackparam / manip_throwable_class

Function manip_throwable_class

src/manip.rs:33–51  ·  view source on GitHub ↗
(jvmti_env: *mut jvmtiEnv,
                                    _jni_env: *mut JNIEnv,
                                    class_data_len: jint,
                                    class_data: *const c

Source from the content-addressed store, hash-verified

31}
32
33pub unsafe fn manip_throwable_class(jvmti_env: *mut jvmtiEnv,
34 _jni_env: *mut JNIEnv,
35 class_data_len: jint,
36 class_data: *const c_uchar,
37 new_class_data_len: *mut jint,
38 new_class_data: *mut *mut c_uchar)
39 -> Result<(), String> {
40 // Read the class
41 let mut class_file = read_class(class_data_len, class_data)?;
42
43 // Do transforms
44 add_stack_params_field(&mut class_file);
45 add_native_stack_params_method(&mut class_file);
46 update_fill_method(&mut class_file)?;
47 replace_our_trace_method(&mut class_file)?;
48
49 // Write the class
50 return write_class(jvmti_env, &class_file, new_class_data_len, new_class_data);
51}
52
53pub unsafe fn manip_element_class(jvmti_env: *mut jvmtiEnv,
54 _jni_env: *mut JNIEnv,

Callers 1

transform_class_fileFunction · 0.85

Calls 6

read_classFunction · 0.85
add_stack_params_fieldFunction · 0.85
update_fill_methodFunction · 0.85
replace_our_trace_methodFunction · 0.85
write_classFunction · 0.85

Tested by

no test coverage detected