X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Flisp%2Fao_lisp_error.c;h=7ad7b2b523f8cf0fde6c3dc4038f8404b86a66b6;hb=c078787a66d56a1e8191501614f66467d68a70d2;hp=8b9fe2d5fd4d6f9e6993d6ba8b79c4ef2710c8d4;hpb=e503e46f5e9ca57b7a7d976b2ee02a3d7812bc92;p=fw%2Faltos diff --git a/src/lisp/ao_lisp_error.c b/src/lisp/ao_lisp_error.c index 8b9fe2d5..7ad7b2b5 100644 --- a/src/lisp/ao_lisp_error.c +++ b/src/lisp/ao_lisp_error.c @@ -49,7 +49,7 @@ ao_lisp_error_frame(int indent, char *name, struct ao_lisp_frame *frame) tabs(indent); printf ("%s{", name); if (frame) { - for (f = 0; f < frame->num; f++) { + for (f = 0; f < ao_lisp_frame_num(frame); f++) { if (f != 0) { tabs(indent); printf(" "); @@ -59,8 +59,8 @@ ao_lisp_error_frame(int indent, char *name, struct ao_lisp_frame *frame) ao_lisp_poly_print(frame->vals[f].val); printf("\n"); } - if (frame->next) - ao_lisp_error_frame(indent + 1, "next: ", ao_lisp_poly_frame(frame->next)); + if (frame->prev) + ao_lisp_error_frame(indent + 1, "prev: ", ao_lisp_poly_frame(frame->prev)); } tabs(indent); printf(" }\n"); @@ -73,6 +73,7 @@ static const char *state_names[] = { "exec", "cond", "cond_test", + "progn", }; void @@ -105,5 +106,8 @@ ao_lisp_error(int error, char *format, ...) va_end(args); printf("\n"); ao_lisp_stack_print(); + printf("Globals:\n\t"); + ao_lisp_frame_print(ao_lisp_frame_poly(ao_lisp_frame_global)); + printf("\n"); return AO_LISP_NIL; }