1: /* "@(#)head.h 4.3 8/17/82" */
   2: #include <sys/vm.h>
   3: #define PAGSIZ  (CLSIZE*NBPG)
   4: #include <stdio.h>
   5: #include <setjmp.h>
   6: #include <sgtty.h>
   7: #include "old.h"
   8: #include "defs.h"
   9: 
  10: /* input line decoding */
  11: char    proc[30];   /* procedure name */
  12: int integ;      /* count or number in input */
  13: char    cmd;        /* command letter */
  14: char    re[128];    /* regular expression */
  15: char    args[128];  /* arguments */
  16: char    *argsp;     /* pointer to args */
  17: char    var[60];    /* variable name */
  18: int scallf;     /* set to 1 iff procedure call */
  19: int reflag;     /* set to 1 iff re */
  20: int redir;      /* set to 1 iff forward search */
  21: int colonflag;  /* set to 1 iff colon typed */
  22: int ncolonflag; /* set to 1 iff colon typed after number */
  23: int percentflag;    /* set to 1 iff percent symbol typed */
  24: 
  25: /* source file i/o */
  26: char    curfile[120];   /* name of file being edited */
  27: int fline;      /* line number in file */
  28: char    fbuf[BUFSIZ];   /* current line from file */
  29: char    filework[128];  /* place to put filename */
  30: char    *fp;        /* pointer to it */
  31: int nolines;    /* set to 1 iff no lines in file */
  32: #ifdef FLEXNAMES
  33: off_t   gstart;     /* start of string table in a.out */
  34: char    *strtab;    /* string table from a.out * (in core!) */
  35: long    ssiz;       /* size of string table (for range checks) */
  36: #endif
  37: 
  38: /* returned by slookup */
  39: #ifndef FLEXNAMES
  40: char    sl_name[8];
  41: #else
  42: char    *sl_name;
  43: #endif
  44: u_char  sl_class;
  45: short   sl_type;
  46: int sl_size, sl_addr;
  47: int subflag;
  48: 
  49: /* procedure call information */
  50: int scallx;         /* procedure call in progress */
  51: ADDR fps, aps, pcs;     /* old stack frame */
  52: BKPTR bkpts;            /* old breakpoint */
  53: int flagss;         /*  and its flags */
  54: char dschar;            /* '/' if value should be displayed */
  55: 
  56: /* symbol table info */
  57: long    ststart;        /* offset of symbol table in a.out */
  58: #ifndef VMUNIX
  59: struct brbuf sbuf;      /* buffer for symbol table */
  60: #endif
  61: long    extstart;       /* offset of first external in a.out */
  62: 
  63: /* address info */
  64: ADDR    dot;            /* current address */
  65: ADDR    callpc, frame, argp;    /* current stack frame */
  66: 
  67: /* other */
  68: char    odesc[10];      /* descriptor of last displayed variable */
  69: ADDR    oaddr;          /* address of last displayed variable */
  70: char    otype;          /* type of last displayed variable */
  71: u_char  oclass;         /* class of last displayed variable */
  72: char    oincr;          /* size of last displayed variable */
  73: struct sgttyb sdbttym, userttym;
  74:                 /* tty modes for sdb and user */
  75: char    oldargs[128];
  76: char prname[50];        /* print name used by outvar */
  77: jmp_buf env;            /* environment for setjmp, longjmp */
  78: int debug;          /* toggled by Y command */
  79: time_t  symtime;        /* modification time of symfil */
  80: char    *symfil;
  81: char    *corfil;
  82: ADDR    exactaddr, lnfaddr; /* set by adrtolineno() */
  83: ADDR    firstdata;      /* lowest address of data */
  84: 
  85: #define STABMASK    0376
  86: #define WINDOW  10      /* window size for display commands */
  87: #define COMMANDS    "\004\"+-=!/BCDMQRSTXabcdegklmpqrstwxzVXY"
  88:                 /* each sdb command must appear here */
  89: #define NUMARGS 16      /* number of args allowed in sub call */
  90: #define SUBSTSP 512     /* length of space for sub args and strings */
  91: #define WORDSIZE 4      /* wordsize in bytes on this machine */
  92: 
  93: #define BIGNUM  0x7fffffff
  94: #define MAXADDR 1L<<30
  95: 
  96: struct filet {
  97: #ifndef FLEXNAMES
  98:     char    sfilename[31];  /* source file name */
  99: #else
 100:     char    *sfilename;
 101: #endif
 102:     char    lineflag;   /* set iff this is a '#line' file */
 103:     ADDR    faddr;      /* address in core */
 104:     long    stf_offset; /* offset in a.out */
 105: } *files, *badfile;
 106: 
 107: struct proct {
 108: #ifndef FLEXNAMES
 109:     char    pname[8];   /* procedure name */
 110: #else
 111:     char    *pname;
 112: #endif
 113:     ADDR    paddr;      /* address in core */
 114:     long    st_offset;  /* offset in a.out */
 115:     struct filet  *sfptr;   /* source file name pointer */
 116:     int lineno;     /* line number in source file */
 117:     char    entrypt;    /* 1 iff a F77 entry */
 118: } *procs, *badproc;
 119: 
 120: 
 121: #define PROCINCR 20
 122: #define FILEINCR 10
 123: 
 124: #define varchar(x)  ((x>='A' && x<='Z') || (x>='a' &&  x<='z') || x == '_' || x == '.' || x == '[' || x == ']' || x == '-' || x == '>' || x == '*' || x == '?')
 125: #define number(x)   (x >= '0' && x <= '9')
 126: 
 127: char *readline(), readchar(), rdc();
 128: char *cpname();
 129: char *cpstr(), *cpall();
 130: char *sbrk();
 131: char *typetodesc();
 132: int octdigit(), decdigit(); hexdigit();
 133: int octconv(), decconv(); hexconv();
 134: long readint(), rint();
 135: long adrtostoffset();
 136: long getval(), argvalue();
 137: long slookup(), globallookup();
 138: ADDR varaddr(), dispvar();
 139: ADDR extaddr(), formaddr(), stackreg();
 140: struct proct *curproc();
 141: struct proct *findproc();
 142: struct proct *adrtoprocp();
 143: struct proct *initframe(), *nextframe();
 144: struct filet *findfile(), *adrtofilep();

Defined variables

args defined in line 15; used 48 times
argsp defined in line 16; used 35 times
badfile defined in line 105; used 14 times
cmd defined in line 13; used 18 times
colonflag defined in line 21; used 8 times
corfil defined in line 81; used 7 times
curfile defined in line 26; used 9 times
dschar defined in line 54; used 2 times
env defined in line 77; used 6 times
extstart defined in line 61; used 7 times
fbuf defined in line 28; used 9 times
files defined in line 105; used 7 times
filework defined in line 29; used 5 times
flagss defined in line 53; used 3 times
fline defined in line 27; used 23 times
fp defined in line 30; used 5 times
integ defined in line 12; used 59 times
ncolonflag defined in line 22; used 4 times
nolines defined in line 31; used 1 times
odesc defined in line 68; used 7 times
oincr defined in line 72; used 18 times
oldargs defined in line 75; used 2 times
otype defined in line 70; used 7 times
prname defined in line 76; used 8 times
proc defined in line 11; used 56 times
procs defined in line 118; used 11 times
re defined in line 14; used 3 times
redir defined in line 20; used 2 times
reflag defined in line 19; used 4 times
sbuf defined in line 59; used 42 times
scallf defined in line 18; used 4 times
scallx defined in line 50; used 5 times
sdbttym defined in line 73; used 11 times
sl_addr defined in line 46; used 12 times
sl_name defined in line 42; used 23 times
sl_size defined in line 46; used 6 times
ssiz defined in line 35; used 12 times
strtab defined in line 34; used 4 times
ststart defined in line 57; used 8 times
subflag defined in line 47; used 21 times
userttym defined in line 73; used 12 times
var defined in line 17; used 72 times

Defined struct's

filet defined in line 96; used 20 times
proct defined in line 107; used 72 times

Defined macros

BIGNUM defined in line 93; used 2 times
COMMANDS defined in line 87; used 4 times
FILEINCR defined in line 122; used 6 times
MAXADDR defined in line 94; never used
NUMARGS defined in line 89; used 4 times
PAGSIZ defined in line 3; never used
PROCINCR defined in line 121; used 2 times
STABMASK defined in line 85; used 26 times
SUBSTSP defined in line 90; never used
WINDOW defined in line 86; used 9 times
varchar defined in line 124; used 5 times

Usage of this include

Last modified: 1982-10-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1835
Valid CSS Valid XHTML 1.0 Strict