summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
48ca2b9)
It was completely broken :/
+const void* mc_page_store_get_page(mc_pages_store_t page_store, size_t pageno)
+{
+ return page_store->get_page(pageno);
+}
+
mc_pages_store_t mc_pages_store_new()
{
return new s_mc_pages_store_t(500);
mc_pages_store_t mc_pages_store_new()
{
return new s_mc_pages_store_t(500);
typedef struct s_mc_pages_store s_mc_pages_store_t, * mc_pages_store_t;
mc_pages_store_t mc_pages_store_new();
typedef struct s_mc_pages_store s_mc_pages_store_t, * mc_pages_store_t;
mc_pages_store_t mc_pages_store_new();
+const void* mc_page_store_get_page(mc_pages_store_t page_store, size_t pageno);
static inline bool mc_snapshot_region_linear(mc_mem_region_t region) {
return !region || !region->data;
static inline bool mc_snapshot_region_linear(mc_mem_region_t region) {
return !region || !region->data;
// Per-page snapshot:
else if (region->page_numbers) {
// Per-page snapshot:
else if (region->page_numbers) {
- size_t pageno = mc_page_number(region->data, (void*) addr);
- return (char*) region->page_numbers[pageno] + mc_page_offset((void*) addr);
+ size_t pageno = mc_page_number(region->start_addr, (void*) addr);
+ size_t snapshot_pageno = region->page_numbers[pageno];
+ const void* snapshot_page = mc_page_store_get_page(mc_model_checker->pages, snapshot_pageno);
+ return (char*) snapshot_page + mc_page_offset((void*) addr);
mc_mem_region_t region = mc_get_snapshot_region((void*) addr, snapshot);
return mc_translate_address_region(addr, region);
mc_mem_region_t region = mc_get_snapshot_region((void*) addr, snapshot);
return mc_translate_address_region(addr, region);
}
/** @brief Read memory from a snapshot region broken across fragmented pages
}
/** @brief Read memory from a snapshot region broken across fragmented pages