X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fprint.c;h=6e6dd12d3d683122fc394867a0313bf7c4f6bb5f;hb=4ed3f0d08c3a57a6762018d9622f253ab9d0f2b6;hp=2cc6f1bfcda10dd4c7e4aec6142003b4503a38e8;hpb=68fd2d2dd6f265669a8957accd8a33e62786a97e;p=sbcl.git diff --git a/src/runtime/print.c b/src/runtime/print.c index 2cc6f1b..6e6dd12 100644 --- a/src/runtime/print.c +++ b/src/runtime/print.c @@ -30,6 +30,13 @@ #include "monitor.h" #include "vars.h" #include "os.h" +#include "gencgc-alloc-region.h" /* genesis/thread.h needs this */ +#include "genesis/static-symbols.h" +#include "genesis/primitive-objects.h" + +#include "genesis/static-symbols.h" + + static int max_lines = 20, cur_lines = 0; static int max_depth = 5, brief_depth = 2, cur_depth = 0; @@ -288,7 +295,7 @@ static void brief_list(lispobj obj) int space = 0; int length = 0; - if (!is_valid_lisp_addr((os_vm_address_t)obj)) + if (!is_valid_lisp_addr((os_vm_address_t)native_pointer(obj))) printf("(invalid Lisp-level address)"); else if (obj == NIL) printf("NIL"); @@ -320,7 +327,7 @@ static void brief_list(lispobj obj) static void print_list(lispobj obj) { - if (!is_valid_lisp_addr((os_vm_address_t)obj)) { + if (!is_valid_lisp_addr((os_vm_address_t)native_pointer(obj))) { printf("(invalid address)"); } else if (obj == NIL) { printf(" (NIL)"); @@ -378,7 +385,7 @@ static void brief_otherptr(lispobj obj) } break; - case SIMPLE_STRING_WIDETAG: + case SIMPLE_BASE_STRING_WIDETAG: vector = (struct vector *)ptr; putchar('"'); for (charptr = (char *)vector->data; *charptr != '\0'; charptr++) { @@ -411,7 +418,11 @@ static void print_slots(char **slots, int count, lispobj *ptr) * on the values in sbcl.h (or perhaps be generated automatically * by GENESIS as part of sbcl.h). */ static char *symbol_slots[] = {"value: ", "unused: ", - "plist: ", "name: ", "package: ", NULL}; + "plist: ", "name: ", "package: ", +#ifdef LISP_FEATURE_SB_THREAD + "tls-index: " , +#endif + NULL}; static char *ratio_slots[] = {"numer: ", "denom: ", NULL}; static char *complex_slots[] = {"real: ", "imag: ", NULL}; static char *code_slots[] = {"words: ", "entry: ", "debug: ", NULL}; @@ -524,7 +535,7 @@ static void print_otherptr(lispobj obj) break; #endif - case SIMPLE_STRING_WIDETAG: + case SIMPLE_BASE_STRING_WIDETAG: NEWLINE_OR_RETURN; cptr = (char *)(ptr+1); putchar('"'); @@ -587,7 +598,8 @@ static void print_otherptr(lispobj obj) #ifdef SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG case SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG: #endif - case COMPLEX_STRING_WIDETAG: + case COMPLEX_BASE_STRING_WIDETAG: + case COMPLEX_VECTOR_NIL_WIDETAG: case COMPLEX_BIT_VECTOR_WIDETAG: case COMPLEX_VECTOR_WIDETAG: case COMPLEX_ARRAY_WIDETAG: @@ -598,7 +610,6 @@ static void print_otherptr(lispobj obj) break; case SIMPLE_FUN_HEADER_WIDETAG: - case CLOSURE_FUN_HEADER_WIDETAG: print_slots(fn_slots, 5, ptr); break;