summaryrefslogtreecommitdiff
path: root/rust/src/high_level_il
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-02-18 13:49:26 -0500
committerMason Reed <mason@vector35.com>2025-02-18 13:50:03 -0500
commit6866a439c4bb3827ce05b7c462b76cdf260e6a2b (patch)
tree1da27c933f632472083592edb0741a9138b80a07 /rust/src/high_level_il
parentd137070833f6d42291c390aaa05d78d400d47c21 (diff)
Fix the lifted GotoLabel in Rust printing the function in Debug impl
This was causing a lot of extra noise, where the function is kept just to ref for the tag name
Diffstat (limited to 'rust/src/high_level_il')
-rw-r--r--rust/src/high_level_il/operation.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/rust/src/high_level_il/operation.rs b/rust/src/high_level_il/operation.rs
index 58accce0..340b85a7 100644
--- a/rust/src/high_level_il/operation.rs
+++ b/rust/src/high_level_il/operation.rs
@@ -1,6 +1,6 @@
-use core::ffi;
-
use binaryninjacore_sys::*;
+use core::ffi;
+use std::fmt::{Debug, Formatter};
use super::HighLevelILLiftedInstruction;
use crate::architecture::CoreIntrinsic;
@@ -9,7 +9,7 @@ use crate::rc::Ref;
use crate::string::{BnStrCompatible, BnString};
use crate::variable::{ConstantData, SSAVariable, Variable};
-#[derive(Clone, Debug, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
pub struct GotoLabel {
pub(crate) function: Ref<Function>,
pub target: u64,
@@ -32,6 +32,15 @@ impl GotoLabel {
}
}
+impl Debug for GotoLabel {
+ fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+ f.debug_struct("GotoLabel")
+ .field("name", &self.name())
+ .field("target", &self.target)
+ .finish()
+ }
+}
+
// ADC, SBB, RLC, RRC
#[derive(Debug, Copy, Clone)]
pub struct BinaryOpCarry {