Skip to content

Commit c00727e

Browse files
committed
Rust remove function ref from HighLevelILLiftedInstruction impl Debug
1 parent 5923675 commit c00727e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

rust/src/high_level_il/lift.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
use super::operation::*;
22
use super::{HighLevelILFunction, HighLevelInstructionIndex};
3+
use std::fmt::{Debug, Formatter};
34

45
use crate::architecture::CoreIntrinsic;
56
use crate::rc::Ref;
67
use crate::variable::{ConstantData, SSAVariable, Variable};
78

8-
#[derive(Clone)]
9+
#[derive(Clone, Debug)]
910
pub enum HighLevelILLiftedOperand {
1011
ConstantData(ConstantData),
1112
Expr(HighLevelILLiftedInstruction),
@@ -25,7 +26,7 @@ pub enum HighLevelILLiftedOperand {
2526
// TODO: We dont even need to say instruction in the type!
2627
// TODO: IF you want to have an instruction type, there needs to be a separate expression type
2728
// TODO: See the lowlevelil module.
28-
#[derive(Clone, Debug, PartialEq)]
29+
#[derive(Clone, PartialEq)]
2930
pub struct HighLevelILLiftedInstruction {
3031
pub function: Ref<HighLevelILFunction>,
3132
pub address: u64,
@@ -460,3 +461,14 @@ impl HighLevelILLiftedInstruction {
460461
}
461462
}
462463
}
464+
465+
impl Debug for HighLevelILLiftedInstruction {
466+
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
467+
f.debug_struct("HighLevelILLiftedInstruction")
468+
.field("address", &self.address)
469+
.field("expr_index", &self.expr_index)
470+
.field("size", &self.size)
471+
.field("kind", &self.kind)
472+
.finish()
473+
}
474+
}

0 commit comments

Comments
 (0)