The tuple is (DebugInfoParserName, TypeName, type)
(&self, address: u64)
| 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(); |
nothing calls this directly
no test coverage detected