X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fcoreparse.c;h=7221bd082ede112bb8cefa67ceb70e6f0b230c4c;hb=59f7d9254f3601cfd48f0c299d5c30562111e991;hp=51cbb8deb98b040b4d583e54e8e958ccc0e683a6;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/runtime/coreparse.c b/src/runtime/coreparse.c index 51cbb8d..7221bd0 100644 --- a/src/runtime/coreparse.c +++ b/src/runtime/coreparse.c @@ -14,10 +14,6 @@ * files for more information. */ -/* - * $Header$ - */ - #include #include #include @@ -31,6 +27,8 @@ #include "runtime.h" #include "globals.h" #include "core.h" +#include "arch.h" +#include "interr.h" #include "sbcl.h" static void process_directory(int fd, long *ptr, int count) @@ -65,22 +63,24 @@ static void process_directory(int fd, long *ptr, int count) switch (id) { case DYNAMIC_SPACE_ID: - if (addr != (os_vm_address_t)dynamic_0_space - && addr != (os_vm_address_t)dynamic_1_space) { - lose("bizarre dynamic space!"); + if (addr != (os_vm_address_t)DYNAMIC_SPACE_START) { + lose("core/runtime address mismatch: DYNAMIC_SPACE_START"); } - current_dynamic_space = (lispobj *)addr; #if defined(ibmrt) || defined(__i386__) SetSymbolValue(ALLOCATION_POINTER, (lispobj)free_pointer); #else - current_dynamic_space_free_pointer = free_pointer; + dynamic_space_free_pointer = free_pointer; #endif break; case STATIC_SPACE_ID: - static_space = (lispobj *) addr; + if (addr != (os_vm_address_t)STATIC_SPACE_START) { + lose("core/runtime address mismatch: STATIC_SPACE_START"); + } break; case READ_ONLY_SPACE_ID: - /* We don't care about read-only space. */ + if (addr != (os_vm_address_t)READ_ONLY_SPACE_START) { + lose("core/runtime address mismatch: READ_ONLY_SPACE_START"); + } break; default: lose("unknown space ID %ld", id); @@ -94,7 +94,7 @@ lispobj load_core_file(char *file) /* KLUDGE: This kind of conditionalization everywhere that 32-bit * ints are used is really nasty. It would be much nicer to define - * a typedef a la addr_as_int once and for all in each + * a typedef like addr_as_int once and for all in each * architecture file, then use that everywhere. -- WHN 19990904 */ #ifndef alpha long header[CORE_PAGESIZE / sizeof(long)], val, len, *ptr;