(method: jmethodID)
| 462 | } |
| 463 | |
| 464 | unsafe fn method_name(method: jmethodID) -> Result<String, String> { |
| 465 | let mut name: *mut c_char = 0 as *mut c_char; |
| 466 | let name_res = (**JVMTI_ENV).GetMethodName.unwrap()(JVMTI_ENV, method, &mut name, ptr::null_mut(), ptr::null_mut()); |
| 467 | util::unit_or_jvmti_err(name_res)?; |
| 468 | let name_str = CStr::from_ptr(name).to_string_lossy().clone().into_owned(); |
| 469 | dealloc(name)?; |
| 470 | return Result::Ok(name_str); |
| 471 | } |
| 472 | |
| 473 | unsafe fn get_stack_trace(thread: jthread, max_depth: jint) -> Result<Vec<jvmtiFrameInfo>, String> { |
| 474 | let mut frames: Vec<jvmtiFrameInfo> = Vec::with_capacity(max_depth as usize); |
nothing calls this directly
no test coverage detected