summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-01-31 13:01:21 -0500
committerMason Reed <mason@vector35.com>2025-01-31 16:17:30 -0500
commitc00727ed11624018b286f57215a677b1140de2ff (patch)
tree72b69ec86e4dcd0982e558ee32c6f3801ea0eb02 /rust/src
parent5923675738605236914363753089053394569520 (diff)
Rust remove function ref from HighLevelILLiftedInstruction impl Debug
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/high_level_il/lift.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/rust/src/high_level_il/lift.rs b/rust/src/high_level_il/lift.rs
index 0c7c2983..fd0b9398 100644
--- a/rust/src/high_level_il/lift.rs
+++ b/rust/src/high_level_il/lift.rs
@@ -1,11 +1,12 @@
use super::operation::*;
use super::{HighLevelILFunction, HighLevelInstructionIndex};
+use std::fmt::{Debug, Formatter};
use crate::architecture::CoreIntrinsic;
use crate::rc::Ref;
use crate::variable::{ConstantData, SSAVariable, Variable};
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub enum HighLevelILLiftedOperand {
ConstantData(ConstantData),
Expr(HighLevelILLiftedInstruction),
@@ -25,7 +26,7 @@ pub enum HighLevelILLiftedOperand {
// TODO: We dont even need to say instruction in the type!
// TODO: IF you want to have an instruction type, there needs to be a separate expression type
// TODO: See the lowlevelil module.
-#[derive(Clone, Debug, PartialEq)]
+#[derive(Clone, PartialEq)]
pub struct HighLevelILLiftedInstruction {
pub function: Ref<HighLevelILFunction>,
pub address: u64,
@@ -460,3 +461,14 @@ impl HighLevelILLiftedInstruction {
}
}
}
+
+impl Debug for HighLevelILLiftedInstruction {
+ fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+ f.debug_struct("HighLevelILLiftedInstruction")
+ .field("address", &self.address)
+ .field("expr_index", &self.expr_index)
+ .field("size", &self.size)
+ .field("kind", &self.kind)
+ .finish()
+ }
+}