X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=snapshot.cc;h=66faacd8e445510f57c7714ce9ccd60a1ee95f3c;hb=2d0d4ac38e05905a6633b3f2d5112ccadd45c27f;hp=e5df30abe2ec39697a04cdc66241bda8b1c07d05;hpb=3e6361c4aaa3febdfa72f9031506babfcdc3b872;p=model-checker.git diff --git a/snapshot.cc b/snapshot.cc index e5df30a..66faacd 100644 --- a/snapshot.cc +++ b/snapshot.cc @@ -148,12 +148,12 @@ static void mprot_snapshot_init(unsigned int numbackingpages, sa.sa_sigaction = mprot_handle_pf; #ifdef MAC if (sigaction(SIGBUS, &sa, NULL) == -1) { - model_print("SIGACTION CANNOT BE INSTALLED\n"); + perror("sigaction(SIGBUS)"); exit(EXIT_FAILURE); } #endif if (sigaction(SIGSEGV, &sa, NULL) == -1) { - model_print("SIGACTION CANNOT BE INSTALLED\n"); + perror("sigaction(SIGSEGV)"); exit(EXIT_FAILURE); } @@ -190,6 +190,9 @@ static void mprot_add_to_snapshot(void *addr, unsigned int numPages) exit(EXIT_FAILURE); } + DEBUG("snapshot region %p-%p (%u page%s)\n", + addr, (char *)addr + numPages * PAGESIZE, numPages, + numPages > 1 ? "s" : ""); mprot_snap->regionsToSnapShot[memoryregion].basePtr = addr; mprot_snap->regionsToSnapShot[memoryregion].sizeInPages = numPages; }