Translate coverage bits to real blocks.
(&self, vm: &mut Vm, bits: &[u32])
| 453 | |
| 454 | /// Translate coverage bits to real blocks. |
| 455 | pub fn blocks_for(&self, vm: &mut Vm, bits: &[u32]) -> Vec<u64> { |
| 456 | self.update_mapping_cache(vm); |
| 457 | let mapping = self.mapping_cache.borrow(); |
| 458 | bits.iter().map(|x| mapping.get(*x as usize).map_or(0, |(addr, _)| *addr)).collect() |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | impl Coverage for BlockCoverage { |
no test coverage detected