diff options
| author | Glenn Smith <glenn@vector35.com> | 2024-03-05 02:09:39 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-03-05 14:01:31 -0500 |
| commit | 0609276712622908254065546102381466033141 (patch) | |
| tree | 2b5fe0e1e16f0fcb21e09c5fb87e360f1968a76d /rust/src/architecture.rs | |
| parent | 2596349220399080054037011947884060414345 (diff) | |
Rust: Implement instruction_llil for CoreArchitecture
Diffstat (limited to 'rust/src/architecture.rs')
| -rw-r--r-- | rust/src/architecture.rs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 1d343972..ee0e3cd3 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -1172,14 +1172,23 @@ impl Architecture for CoreArchitecture { } } } - + fn instruction_llil( &self, - _data: &[u8], - _addr: u64, - _il: &mut Lifter<Self>, + data: &[u8], + addr: u64, + il: &mut Lifter<Self>, ) -> Option<(usize, bool)> { - None + let mut size = data.len(); + let success = unsafe { + BNGetInstructionLowLevelIL(self.0, data.as_ptr(), addr, &mut size as *mut _, il.handle) + }; + + if !success { + None + } else { + Some((size, true)) + } } fn flag_write_llil<'a>( |
