jvmti_rs/wrapper/facade/
stack_frame.rs

1use crate::{errors::*, objects::*, JVMTIFacadeEnv};
2use crate::sys::jint;
3
4impl<'a> JVMTIFacadeEnv<'a> {
5    pub fn get_stack_trace(&self, thread: &JThreadID, start_depth: jint, max_frame_count: jint) -> Result<(JFrameInfo, jint)> {
6        self.jvmti_rust().get_stack_trace(thread, start_depth, max_frame_count)
7    }
8
9    pub fn get_all_stack_traces(&self, max_frame_count: jint) -> Result<(Vec<JStackInfo>, jint)> {
10        self.jvmti_rust().get_all_stack_traces(max_frame_count)
11    }
12
13    pub fn get_thread_list_stack_traces(&self, threads: &Vec<JThreadID>, max_frame_count: jint) -> Result<Vec<JStackInfo>> {
14        self.jvmti_rust().get_thread_list_stack_traces(threads, max_frame_count)
15    }
16
17    pub fn get_frame_count(&self, thread: &JThreadID) -> Result<jint> {
18        self.jvmti_rust().get_frame_count(thread)
19    }
20
21    pub fn get_frame_location(&self, thread: &JThreadID, depth: jint) -> Result<Option<JFrameInfo>> {
22        self.jvmti_rust().get_frame_location(thread, depth)
23    }
24
25    pub fn pop_frame(&self, thread: &JThreadID) -> Result<()> {
26        self.jvmti_rust().pop_frame(thread)
27    }
28
29    pub fn notify_frame_pop(&self, thread: &JThreadID, depth: jint) -> Result<()> {
30        self.jvmti_rust().notify_frame_pop(thread, depth)
31    }
32}