From a012274c03ae35e1c10f06bc0f4f95458d5eafba Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Wed, 14 Dec 2016 23:09:56 +0100 Subject: [PATCH] feat: Allow querying the number of frames on the stack in the debug api --- vm/src/thread.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vm/src/thread.rs b/vm/src/thread.rs index 21d2d98c0d..d318baa902 100644 --- a/vm/src/thread.rs +++ b/vm/src/thread.rs @@ -711,6 +711,10 @@ impl<'a> DebugInfo<'a> { None } } + + pub fn stack_info_len(&self) -> usize { + self.stack.get_frames().len() + } } impl<'a> StackInfo<'a> {