changes to which whereis and STACKSIZE for fortran support
authorAlastair Fyfe <csvaf@ucbvax.Berkeley.EDU>
Thu, 19 May 1983 10:30:15 +0000 (02:30 -0800)
committerAlastair Fyfe <csvaf@ucbvax.Berkeley.EDU>
Thu, 19 May 1983 10:30:15 +0000 (02:30 -0800)
evaluation of DEBUG command

SCCS-vsn: old/dbx/eval.c 1.7

usr/src/old/dbx/eval.c

index adff858..76e5a4c 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1982 Regents of the University of California */
 
 /* Copyright (c) 1982 Regents of the University of California */
 
-static char sccsid[] = "@(#)eval.c 1.6 %G%";
+static char sccsid[] = "@(#)eval.c 1.7 %G%";
 
 /*
  * Tree evaluation.
 
 /*
  * Tree evaluation.
@@ -24,7 +24,7 @@ static char sccsid[] = "@(#)eval.c 1.6 %G%";
 
 #include "machine.h"
 
 
 #include "machine.h"
 
-#define STACKSIZE 2000
+#define STACKSIZE 20000
 
 typedef Char Stack;
 
 
 typedef Char Stack;
 
@@ -81,6 +81,9 @@ register Node p;
     File file;
 
     checkref(p);
     File file;
 
     checkref(p);
+    if(debug_flag[2]) {
+                     fprintf(stderr," evaluating %s \n",showoperator(p->op));
+    }
     switch (degree(p->op)) {
        case BINARY:
            poparg(1, r1, fr1);
     switch (degree(p->op)) {
        case BINARY:
            poparg(1, r1, fr1);
@@ -158,6 +161,8 @@ register Node p;
                len = size(p->nodetype);
            }
            rpush(addr, len);
                len = size(p->nodetype);
            }
            rpush(addr, len);
+       addr = pop(long);
+        push(long, addr);
            break;
 
        /*
            break;
 
        /*
@@ -416,11 +421,19 @@ register Node p;
            break;
 
        case O_WHEREIS:
            break;
 
        case O_WHEREIS:
-           printwhereis(stdout, p->value.arg[0]->value.sym);
+           if (p->value.arg[0]->op == O_SYM) {
+               printwhereis(stdout,p->value.arg[0]->value.sym);
+           } else {
+               printwhereis(stdout,p->value.arg[0]->nodetype);
+           }
            break;
 
        case O_WHICH:
            break;
 
        case O_WHICH:
-           printwhich(stdout, p->value.arg[0]->value.sym);
+           if (p->value.arg[0]->op == O_SYM) {
+               printwhich(stdout,p->value.arg[0]->value.sym);
+           } else {
+               printwhich(stdout,p->value.arg[0]->nodetype);
+           }
            putchar('\n');
            break;
 
            putchar('\n');
            break;
 
@@ -448,6 +461,10 @@ register Node p;
            edit(p->value.scon);
            break;
 
            edit(p->value.scon);
            break;
 
+        case O_DEBUG:
+            debug(p);
+           break;
+
        case O_DUMP:
            dump();
            break;
        case O_DUMP:
            dump();
            break;
@@ -569,6 +586,10 @@ register Node p;
        default:
            panic("eval: bad op %d", p->op);
     }
        default:
            panic("eval: bad op %d", p->op);
     }
+ if(debug_flag[2]) { 
+       fprintf(stderr," evaluated %s \n",showoperator(p->op));
+ }
+           
 }
 
 /*
 }
 
 /*