MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / create_user_stack_var

Method create_user_stack_var

rust/src/medium_level_il/function.rs:125–141  ·  view source on GitHub ↗
(
        self,
        offset: i64,
        var_type: C,
        name: S,
    )

Source from the content-addressed store, hash-verified

123 }
124
125 pub fn create_user_stack_var<'a, S: BnStrCompatible, C: Into<Conf<&'a Type>>>(
126 self,
127 offset: i64,
128 var_type: C,
129 name: S,
130 ) {
131 let mut owned_raw_var_ty = Conf::<&Type>::into_raw(var_type.into());
132 let name = name.into_bytes_with_nul();
133 unsafe {
134 BNCreateUserStackVariable(
135 self.function().handle,
136 offset,
137 &mut owned_raw_var_ty,
138 name.as_ref().as_ptr() as *const c_char,
139 )
140 }
141 }
142
143 pub fn delete_user_stack_var(self, offset: i64) {
144 unsafe { BNDeleteUserStackVariable(self.function().handle, offset) }

Callers

nothing calls this directly

Calls 3

into_bytes_with_nulMethod · 0.80
functionMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected