diff --git a/lisp/c/sysfunc.c b/lisp/c/sysfunc.c index 3e7bdec60..3a7c5a6be 100644 --- a/lisp/c/sysfunc.c +++ b/lisp/c/sysfunc.c @@ -687,6 +687,20 @@ pointer argv[]; /* stack frame access /* 1988-Apr-26 /****************************************************************/ +pointer LISTALLBLOCKS(ctx,n,argv) +register context *ctx; +int n; +pointer *argv; +{ pointer blocks=NIL; + struct blockframe *bfp=ctx->blkfp; + int i=0; + while (bfp) { + if (bfp->kind==BLOCKFRAME) { + vpush(bfp->name); + i++;} + bfp=bfp->lexklink;} + return(stacknlist(ctx,i));} + pointer LISTALLCATCHERS(ctx,n,argv) register context *ctx; int n; @@ -799,6 +813,7 @@ pointer mod; /* defun(ctx,"MALLOC_DEBUG",mod,MALLOC_DEBUG,NULL); /* defun(ctx,"MALLOC_VERIFY",mod,MALLOC_VERIFY,NULL); */ defun(ctx,"LIST-ALL-REFERENCES",mod,LISTALLREFERENCES,NULL); + defun(ctx,"LIST-ALL-BLOCKS",mod,LISTALLBLOCKS,NULL); defun(ctx,"LIST-ALL-CATCHERS",mod,LISTALLCATCHERS,NULL); defun(ctx,"LIST-ALL-BINDINGS",mod,LISTBINDINGS,NULL); defun(ctx,"LIST-ALL-SPECIAL-BINDINGS",mod,LISTSPECIALBINDINGS,NULL); diff --git a/lisp/l/eusstart.l b/lisp/l/eusstart.l index 4478db5ac..f7c0f2a91 100644 --- a/lisp/l/eusstart.l +++ b/lisp/l/eusstart.l @@ -175,7 +175,7 @@ ALLOC NEWSTACK RECLAIM RECLAIM-TREE OBJECT-SIZE MEMORY-REPORT CLEAR-MEMORY-REPORT ROOM LIST-ALL-CHUNKS LIST-ALL-INSTANCES ADDRESS PEEK POKE - LIST-ALL-REFERENCES LIST-ALL-CATCHERS LIST-ALL-BINDINGS + LIST-ALL-REFERENCES LIST-ALL-BLOCKS LIST-ALL-CATCHERS LIST-ALL-BINDINGS LIST-ALL-SPECIAL-BINDINGS LIST-ALL-CLASSES)) (export '*threads*) diff --git a/lisp/l/exports.l b/lisp/l/exports.l index ef5a29800..fa6c88c2a 100644 --- a/lisp/l/exports.l +++ b/lisp/l/exports.l @@ -170,7 +170,7 @@ ALLOC NEWSTACK RECLAIM RECLAIM-TREE OBJECT-SIZE MEMORY-REPORT CLEAR-MEMORY-REPORT ROOM LIST-ALL-CHUNKS LIST-ALL-INSTANCES ADDRESS PEEK POKE - LIST-ALL-REFERENCES LIST-ALL-CATCHERS LIST-ALL-BINDINGS + LIST-ALL-REFERENCES LIST-ALL-BLOCKS LIST-ALL-CATCHERS LIST-ALL-BINDINGS LIST-ALL-SPECIAL-BINDINGS LIST-ALL-CLASSES))