(&self)
| 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(); |
nothing calls this directly
no test coverage detected