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

Method relocation_ranges

rust/src/binary_view.rs:1446–1463  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1444 }
1445
1446 fn relocation_ranges(&self) -> Vec<Range<u64>> {
1447 let ranges = unsafe {
1448 let mut count = 0;
1449 let reloc_ranges_ptr = BNGetRelocationRanges(self.as_ref().handle, &mut count);
1450 let ranges = std::slice::from_raw_parts(reloc_ranges_ptr, count).to_vec();
1451 BNFreeRelocationRanges(reloc_ranges_ptr);
1452 ranges
1453 };
1454
1455 // TODO: impl From BNRange for Range?
1456 ranges
1457 .iter()
1458 .map(|range| Range {
1459 start: range.start,
1460 end: range.end,
1461 })
1462 .collect()
1463 }
1464
1465 fn component_by_guid<S: BnStrCompatible>(&self, guid: S) -> Option<Ref<Component>> {
1466 let name = guid.into_bytes_with_nul();

Callers

nothing calls this directly

Implementers 1

binary_view.rsrust/src/binary_view.rs

Calls 4

to_vecMethod · 0.80
mapMethod · 0.80
as_refMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected