X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fprint.c;h=2cc6f1bfcda10dd4c7e4aec6142003b4503a38e8;hb=b767eae48831153473226b985511c8f7a3ef98c5;hp=d39586d27ea96259d6150cf34f2e25d152cd5de2;hpb=3c65762b927af861c9c8bc416e4cbac9a14ec0c3;p=sbcl.git diff --git a/src/runtime/print.c b/src/runtime/print.c index d39586d..2cc6f1b 100644 --- a/src/runtime/print.c +++ b/src/runtime/print.c @@ -22,11 +22,11 @@ #include "print.h" #include "runtime.h" +#include "sbcl.h" /* This file can be skipped if we're not supporting LDB. */ #if defined(LISP_FEATURE_SB_LDB) -#include "sbcl.h" #include "monitor.h" #include "vars.h" #include "os.h" @@ -43,11 +43,11 @@ static void print_obj(char *prefix, lispobj obj); char *lowtag_Names[] = { "even fixnum", - "function pointer", + "instance pointer", "other immediate [0]", "list pointer", "odd fixnum", - "instance pointer", + "function pointer", "other immediate [1]", "other pointer" }; @@ -247,8 +247,8 @@ static void brief_otherimm(lispobj obj) default: idx = type >> 2; - if (idx < (sizeof(SUBNAMES_WIDETAG) / sizeof(char *))) - printf("%s", SUBNAMES_WIDETAG[idx]); + if (idx < (sizeof(lowtag_Names) / sizeof(char *))) + printf("%s", lowtag_Names[idx]); else printf("unknown type (0x%0x)", type); break; @@ -262,8 +262,8 @@ static void print_otherimm(lispobj obj) type = widetag_of(obj); idx = type >> 2; - if (idx < (sizeof(SUBNAMES_WIDETAG) / sizeof(char *))) - printf(", %s", SUBNAMES_WIDETAG[idx]); + if (idx < (sizeof(lowtag_Names) / sizeof(char *))) + printf(", %s", lowtag_Names[idx]); else printf(", unknown type (0x%0x)", type); @@ -407,14 +407,16 @@ static void print_slots(char **slots, int count, lispobj *ptr) } } -/* FIXME: Yikes again! This, like SUBNAMES_WIDETAG[], needs to depend - * on the values in sbcl.h. */ +/* FIXME: Yikes again! This, like subtype_Names[], needs to depend + * 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}; static char *ratio_slots[] = {"numer: ", "denom: ", NULL}; static char *complex_slots[] = {"real: ", "imag: ", NULL}; static char *code_slots[] = {"words: ", "entry: ", "debug: ", NULL}; -static char *fn_slots[] = {"self: ", "next: ", "name: ", "arglist: ", "type: ", NULL}; +static char *fn_slots[] = { + "self: ", "next: ", "name: ", "arglist: ", "type: ", NULL}; static char *closure_slots[] = {"fn: ", NULL}; static char *funcallable_instance_slots[] = {"fn: ", "lexenv: ", "layout: ", NULL}; static char *weak_pointer_slots[] = {"value: ", NULL}; @@ -650,11 +652,11 @@ static void print_otherptr(lispobj obj) static void print_obj(char *prefix, lispobj obj) { static void (*verbose_fns[])(lispobj obj) - = {print_fixnum, print_otherptr, print_otherimm, print_list, - print_fixnum, print_struct, print_otherimm, print_otherptr}; + = {print_fixnum, print_struct, print_otherimm, print_list, + print_fixnum, print_otherptr, print_otherimm, print_otherptr}; static void (*brief_fns[])(lispobj obj) - = {brief_fixnum, brief_otherptr, brief_otherimm, brief_list, - brief_fixnum, brief_struct, brief_otherimm, brief_otherptr}; + = {brief_fixnum, brief_struct, brief_otherimm, brief_list, + brief_fixnum, brief_otherptr, brief_otherimm, brief_otherptr}; int type = lowtag_of(obj); struct var *var = lookup_by_obj(obj); char buffer[256];