| 62 | } |
| 63 | |
| 64 | BNSharedCacheRegion RegionToApi(const CacheRegion& region) |
| 65 | { |
| 66 | BNSharedCacheRegion apiRegion; |
| 67 | apiRegion.vmAddress = region.start; |
| 68 | apiRegion.name = BNAllocString(region.name.c_str()); |
| 69 | apiRegion.size = region.size; |
| 70 | apiRegion.flags = region.flags; |
| 71 | apiRegion.regionType = RegionTypeToApi(region.type); |
| 72 | // If not associated with image this will be zeroed. |
| 73 | apiRegion.imageStart = region.imageStart.value_or(0); |
| 74 | return apiRegion; |
| 75 | } |
| 76 | |
| 77 | CacheRegion RegionFromApi(const BNSharedCacheRegion& apiRegion) |
| 78 | { |
no test coverage detected