libmwemu 0.24.3

x86 32/64bits and system internals emulator, for securely emulating malware and other stuff.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{emu::Emu, threading::context::ArchThreadState};

impl Emu {
    pub fn call_stack(&self) -> &Vec<(u64, u64)> {
        match &self.threads[self.current_thread_id].arch {
            ArchThreadState::X86 { call_stack, .. } => call_stack,
            _ => panic!("call_stack() called on aarch64 emu"),
        }
    }

    pub fn call_stack_mut(&mut self) -> &mut Vec<(u64, u64)> {
        match &mut self.threads[self.current_thread_id].arch {
            ArchThreadState::X86 { call_stack, .. } => call_stack,
            _ => panic!("call_stack_mut() called on aarch64 emu"),
        }
    }
}