diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-30 16:39:32 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-05-30 19:17:10 -0400 |
| commit | 68b00cdf45551ba64c4f7217963055fc5a1a0cc4 (patch) | |
| tree | f6bdef06bc02d16596bdf62870c8a1cfafe49859 /rust/src/medium_level_il/lift.rs | |
| parent | 77ab5e812af200b8e3bca0aac31d5fe0f638fba3 (diff) | |
[Rust] Express expression vs instruction index for MLIL and HLIL APIs
This was done to fix unintended behavior using an instruction or expression index in place of the other.
Fixes https://github.com/Vector35/binaryninja-api/issues/6897
Diffstat (limited to 'rust/src/medium_level_il/lift.rs')
| -rw-r--r-- | rust/src/medium_level_il/lift.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rust/src/medium_level_il/lift.rs b/rust/src/medium_level_il/lift.rs index 399bda78..e563f26d 100644 --- a/rust/src/medium_level_il/lift.rs +++ b/rust/src/medium_level_il/lift.rs @@ -1,5 +1,5 @@ use super::operation::*; -use super::{MediumLevelILFunction, MediumLevelInstructionIndex}; +use super::{MediumLevelExpressionIndex, MediumLevelILFunction, MediumLevelInstructionIndex}; use crate::architecture::CoreIntrinsic; use crate::rc::Ref; use crate::variable::{ConstantData, SSAVariable, Variable}; @@ -27,7 +27,8 @@ pub enum MediumLevelILLiftedOperand { pub struct MediumLevelILLiftedInstruction { pub function: Ref<MediumLevelILFunction>, pub address: u64, - pub index: MediumLevelInstructionIndex, + pub instr_index: MediumLevelInstructionIndex, + pub expr_index: MediumLevelExpressionIndex, pub size: usize, pub kind: MediumLevelILLiftedInstructionKind, } @@ -36,7 +37,8 @@ impl Debug for MediumLevelILLiftedInstruction { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_struct("MediumLevelILLiftedInstruction") .field("address", &self.address) - .field("index", &self.index) + .field("instr_index", &self.instr_index) + .field("expr_index", &self.expr_index) .field("size", &self.size) .field("kind", &self.kind) .finish() |
