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

Method create_auto_stack_var

rust/src/medium_level_il/function.rs:277–294  ·  view source on GitHub ↗
(
        &self,
        offset: i64,
        var_type: T,
        name: S,
    )

Source from the content-addressed store, hash-verified

275 }
276
277 pub fn create_auto_stack_var<'a, T: Into<Conf<&'a Type>>, S: BnStrCompatible>(
278 &self,
279 offset: i64,
280 var_type: T,
281 name: S,
282 ) {
283 let mut owned_raw_var_ty = Conf::<&Type>::into_raw(var_type.into());
284 let name = name.into_bytes_with_nul();
285 let name_c_str = name.as_ref();
286 unsafe {
287 BNCreateAutoStackVariable(
288 self.function().handle,
289 offset,
290 &mut owned_raw_var_ty,
291 name_c_str.as_ptr() as *const c_char,
292 )
293 }
294 }
295
296 pub fn delete_auto_stack_var(&self, offset: i64) {
297 unsafe { BNDeleteAutoStackVariable(self.function().handle, offset) }

Callers

nothing calls this directly

Calls 3

into_bytes_with_nulMethod · 0.80
as_refMethod · 0.45
functionMethod · 0.45

Tested by

no test coverage detected