Struct cwe_checker_lib::pcode::Program
source · pub struct Program {
pub subs: Vec<Term<Sub>>,
pub extern_symbols: Vec<ExternSymbol>,
pub entry_points: Vec<Tid>,
pub image_base: String,
}
Expand description
The program struct containing all information about the binary except for CPU-architecture-related information.
Fields§
§subs: Vec<Term<Sub>>
The subfunctions contained in the binary.
extern_symbols: Vec<ExternSymbol>
The extern symbols referenced by the binary.
entry_points: Vec<Tid>
The term identifiers of entry points into the binary.
image_base: String
The base address of the memory image of the binary in RAM as reported by Ghidra.
Note that Ghidra may add an offset to the image base address as reported by the binary itself.
Implementations§
source§impl Program
impl Program
sourcepub fn into_ir_program(
self,
binary_base_address: u64,
conventions: &[CallingConvention],
stack_pointer: &Variable,
cpu_arch: &str
) -> IrProgram
pub fn into_ir_program( self, binary_base_address: u64, conventions: &[CallingConvention], stack_pointer: &Variable, cpu_arch: &str ) -> IrProgram
Convert a program parsed from Ghidra to the internally used IR.
The binary_base_address
denotes the base address of the memory image of the binary
according to the program headers of the binary.
It is needed to detect whether Ghidra added a constant offset to all addresses of the memory address.
E.g. if the binary_base_address
is 0 for shared object files,
Ghidra adds an offset so that the memory image does not actually start at address 0.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Program
impl<'de> Deserialize<'de> for Program
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for Program
impl PartialEq for Program
impl Eq for Program
impl StructuralEq for Program
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.