fix build

This commit is contained in:
Alwin Berger 2024-06-14 14:06:21 +02:00
parent 5e29f4b909
commit b86ac4cac6
2 changed files with 11 additions and 2 deletions

View File

@ -8,7 +8,16 @@ use pyo3::prelude::*;
pub use strum_macros::EnumIter;
pub use syscall_numbers::arm::*;
use crate::{sync_backdoor::SyncBackdoorArgs, CallingConvention};
use crate::{sync_backdoor::SyncBackdoorArgs, CPUStatePtr, CallingConvention, Emulator};
extern "C" {
fn libafl_qemu_read_user_sp_unchecked(cpu: CPUStatePtr) -> i32;
}
pub fn read_user_reg_unchecked(emu : &Emulator) -> i32
{
unsafe {libafl_qemu_read_user_sp_unchecked(emu.current_cpu().unwrap().ptr)}.into()
}
/// Registers for the ARM instruction set.
#[derive(IntoPrimitive, TryFromPrimitive, Debug, Clone, Copy, EnumIter)]

View File

@ -491,7 +491,7 @@ extern "C" fn gdb_cmd(data: *const (), buf: *const u8, len: usize) -> i32 {
#[derive(Debug)]
#[repr(transparent)]
pub struct CPU {
ptr: CPUStatePtr,
pub ptr: CPUStatePtr,
}
#[derive(Debug, PartialEq)]