1: # include   "ctlmod.h"
   2: # include   <tree.h>
   3: # include   <sccs.h>
   4: 
   5: SCCSID(@(#)sysdump.c	8.1	12/31/84)
   6: 
   7: /*
   8: **  SYSDUMP -- dump all parameters & state of system.
   9: **
  10: **	This is a process to put in for debugging.
  11: */
  12: 
  13: extern int  sysdump();
  14: extern int  null_fn();
  15: extern int  dump_cm();
  16: 
  17: short   tTsysdump[40];
  18: 
  19: struct fn_def   SysDmpFn =
  20: {
  21:     "SYSDUMP",
  22:     sysdump,
  23:     dump_cm,
  24:     null_fn,
  25:     NULL,
  26:     0,
  27:     tTsysdump,
  28:     40,
  29:     'Q',
  30:     0
  31: };
  32: 
  33: sysdump(pc, pv)
  34:     int     pc;
  35:     register PARM   pv[];
  36: {
  37:     register int    i;
  38:     auto char   cx;
  39: 
  40:     tTfp(30, 0, "\n\nENTERED SYSDUMP\n\n");
  41: 
  42:     tTfp(30, 1, "Parameter vector:\n");
  43: 
  44:     if (tTf(30, 2))
  45:         prvect(pc, pv);
  46: 
  47:     tTfp(30, 3, "\nMonitor input: \"");
  48: 
  49:     if (tTf(30, 4))
  50:     {
  51:         while (readmon(&cx, 1) > 0)
  52:             xputchar(cx);
  53: 
  54:         printf("\"\n");
  55:     }
  56: 
  57:     if (tTf(30, 5))
  58:     {
  59:         printf("\nQuery tree area:\n");
  60:         printf("Qmode = %d\tResvar = %d\n", Qt.qt_qmode, Qt.qt_resvar);
  61:     }
  62: 
  63:     if (tTf(30, 6))
  64:     {
  65:         printf("\nRange table:\n");
  66:         for (i = 0; i < MAXRANGE; i++)
  67:         {
  68:             if (Qt.qt_rangev[i].rngvdesc != NULL)
  69:             {
  70:                 printf("\nVAR %d: ", i);
  71:                 printdesc(Qt.qt_rangev[i].rngvdesc);
  72:             }
  73:         }
  74:         printf("\n\n");
  75:     }
  76: 
  77:     return (0);
  78: }
  79: /*
  80: **  DUMP_CM -- dump control module configuration table.
  81: */
  82: 
  83: /*ARGSUSED*/
  84: dump_cm(argc, argv)
  85: int argc;
  86: char    **argv;
  87: {
  88:     register int        i;
  89:     register state_t    *s;
  90:     register proc_t     *pr;
  91:     static int      reenter;
  92: 
  93:     if (!tTf(30, 0) || reenter++ > 0)
  94:         return;
  95: 
  96:     printf("\n\n\nCONTROL MODULE CONFIGURATION TABLES:\n");
  97: 
  98:     printf("\nThe states:\n");
  99:     for (i = 0, s = Cm.cm_state; i < CM_MAXST; i++, s++)
 100:     {
 101:         if (s->st_type == ST_UNDEF)
 102:             continue;
 103:         printf("%3d: stat %3o ", i, s->st_stat);
 104:         switch (s->st_type)
 105:         {
 106:           case ST_LOCAL:
 107:             printf("(loc) func %d next %2d\n", s->st_v.st_loc.st_funcno,
 108:                 s->st_v.st_loc.st_next);
 109:             break;
 110: 
 111:           case ST_REMOT:
 112:             printf("(rem) proc %d\n", s->st_v.st_rem.st_proc);
 113:             break;
 114: 
 115:           default:
 116:             printf("bad type %d\n", s->st_type);
 117:             break;
 118:         }
 119:     }
 120: 
 121:     printf("\nThe procs:\n");
 122:     for (i = 0, pr = Cm.cm_proc; i < CM_MAXPROC; i++, pr++)
 123:     {
 124:         printf("%3d: stat %4o file %2d ninput %2d\n", i, pr->pr_stat,
 125:             pr->pr_file, pr->pr_ninput);
 126:     }
 127: 
 128:     printf("\nInitial input = %d\n", Cm.cm_input);
 129: 
 130:     printf("\n\n\n");
 131: }

Defined functions

dump_cm defined in line 84; used 2 times
sysdump defined in line 33; used 2 times

Defined variables

SysDmpFn defined in line 19; never used
tTsysdump defined in line 17; used 1 times
  • in line 27
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 976
Valid CSS Valid XHTML 1.0 Strict