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

Method get_data_variables_by_address

rust/src/debuginfo.rs:653–675  ·  view source on GitHub ↗

The tuple is (DebugInfoParserName, TypeName, type)

(&self, address: u64)

Source from the content-addressed store, hash-verified

651
652 /// The tuple is (DebugInfoParserName, TypeName, type)
653 pub fn get_data_variables_by_address(&self, address: u64) -> Vec<(String, String, Ref<Type>)> {
654 let mut count: usize = 0;
655 let raw_variables_and_names =
656 unsafe { BNGetDebugDataVariablesByAddress(self.handle, address, &mut count) };
657
658 let variables_and_names: &[*mut BNDataVariableAndNameAndDebugParser] =
659 unsafe { std::slice::from_raw_parts(raw_variables_and_names as *mut _, count) };
660
661 let result = variables_and_names
662 .iter()
663 .take(count)
664 .map(|&variable_and_name| unsafe {
665 (
666 raw_to_string((*variable_and_name).parser).unwrap(),
667 raw_to_string((*variable_and_name).name).unwrap(),
668 Type::from_raw((*variable_and_name).type_).to_owned(),
669 )
670 })
671 .collect();
672
673 unsafe { BNFreeDataVariableAndNameAndDebugParserList(raw_variables_and_names, count) };
674 result
675 }
676
677 pub fn remove_parser_info<S: BnStrCompatible>(&self, parser_name: S) -> bool {
678 let parser_name = parser_name.into_bytes_with_nul();

Callers

nothing calls this directly

Calls 4

raw_to_stringFunction · 0.85
mapMethod · 0.80
iterMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected