From 9b8dc0382fc6f13a8994ae0520fd125aa00344c5 Mon Sep 17 00:00:00 2001 From: Valentin Obst Date: Thu, 27 Jun 2024 13:11:05 +0200 Subject: [PATCH] lib/pcode: remove module --- src/cwe_checker_lib/src/lib.rs | 2 +- src/cwe_checker_lib/src/pcode/mod.rs | 6 ++++-- src/cwe_checker_lib/src/pcode/term.rs | 6 ++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/cwe_checker_lib/src/lib.rs b/src/cwe_checker_lib/src/lib.rs index f10185d4c..e5340ec5b 100644 --- a/src/cwe_checker_lib/src/lib.rs +++ b/src/cwe_checker_lib/src/lib.rs @@ -70,7 +70,7 @@ pub mod analysis; pub mod checkers; pub mod ghidra_pcode; pub mod intermediate_representation; -pub mod pcode; +mod pcode; pub mod pipeline; pub mod utils; diff --git a/src/cwe_checker_lib/src/pcode/mod.rs b/src/cwe_checker_lib/src/pcode/mod.rs index c7c5618e9..178395088 100644 --- a/src/cwe_checker_lib/src/pcode/mod.rs +++ b/src/cwe_checker_lib/src/pcode/mod.rs @@ -7,8 +7,10 @@ //! The contents of this module are only used for the initial translation of P-Code into the internally used IR. //! For everything else the [`intermediate_representation`](crate::intermediate_representation) should be used directly. +#![allow(dead_code)] + mod expressions; -pub use expressions::*; +use expressions::*; mod term; -pub use term::*; +use term::*; mod subregister_substitution; diff --git a/src/cwe_checker_lib/src/pcode/term.rs b/src/cwe_checker_lib/src/pcode/term.rs index 507f27453..81fccaca1 100644 --- a/src/cwe_checker_lib/src/pcode/term.rs +++ b/src/cwe_checker_lib/src/pcode/term.rs @@ -1,3 +1,5 @@ +#![allow(unused_variables)] + use std::collections::{BTreeSet, HashMap}; use super::subregister_substitution::replace_input_subregister; @@ -21,6 +23,7 @@ use crate::utils::log::LogMessage; use std::fmt::{self, Display}; + // TODO: Handle the case where an indirect tail call is represented by CALLIND plus RETURN // TODO: Since we do not support BAP anymore, this module should be refactored @@ -383,6 +386,7 @@ impl Term { } } + /* let blocks = self .term .blocks @@ -400,6 +404,8 @@ impl Term { calling_convention: self.term.calling_convention, }, } + */ + todo!() } }