Annotation of 43BSD/bin/adb/defs.h, revision 1.1.1.1

1.1       root        1: /*     defs.h  4.6     86/03/26        */
                      2: 
                      3: /*
                      4:  * adb - vax string table version; common definitions
                      5:  */
                      6: #include <machine/psl.h>
                      7: #include <machine/pte.h>
                      8: 
                      9: #include <sys/param.h>
                     10: #include <sys/dir.h>
                     11: #include <sys/user.h>
                     12: 
                     13: #include <ctype.h>
                     14: #include <a.out.h>
                     15: #include <sys/ptrace.h>
                     16: 
                     17: #include "mac.h"
                     18: #include "mode.h"
                     19: #include "head.h"
                     20: 
                     21: /* access modes */
                     22: #define RD     0
                     23: #define WT     1
                     24: 
                     25: #define NSP    0
                     26: #define        ISP     1
                     27: #define        DSP     2
                     28: #define STAR   4
                     29: #define STARCOM 0200
                     30: 
                     31: /*
                     32:  * Symbol types, used internally in calls to findsym routine.
                     33:  * One the VAX this all degenerates since I & D symbols are indistinct.
                     34:  * Basically we get NSYM==0 for `=' command, ISYM==DSYM otherwise.
                     35:  */
                     36: #define NSYM   0
                     37: #define DSYM   1               /* Data space symbol */
                     38: #define ISYM   DSYM            /* Instruction space symbol == DSYM on VAX */
                     39: 
                     40: #define BKPTSET        1
                     41: #define BKPTEXEC 2
                     42: 
                     43: #define USERPS PSL
                     44: #define USERPC PC
                     45: #define BPT    03
                     46: #define TBIT   020
                     47: #define FD     0200
                     48: 
                     49: /* puns from <sys/ptrace.h> */
                     50: #define        CONTIN  PT_CONTINUE
                     51: #define SINGLE PT_STEP
                     52: 
                     53: /* the quantities involving ctob() are located in the kernel stack. */
                     54: /* the others are in the pcb. */
                     55: #define KSP    0
                     56: #define ESP    4
                     57: #define SSP    8
                     58: #define USP    (ctob(UPAGES)-5*sizeof(int))
                     59: #define R0     (ctob(UPAGES)-18*sizeof(int))
                     60: #define R1     (ctob(UPAGES)-17*sizeof(int))
                     61: #define R2     (ctob(UPAGES)-16*sizeof(int))
                     62: #define R3     (ctob(UPAGES)-15*sizeof(int))
                     63: #define R4     (ctob(UPAGES)-14*sizeof(int))
                     64: #define R5     (ctob(UPAGES)-13*sizeof(int))
                     65: #define R6     (ctob(UPAGES)-12*sizeof(int))
                     66: #define R7     (ctob(UPAGES)-11*sizeof(int))
                     67: #define R8     (ctob(UPAGES)-10*sizeof(int))
                     68: #define R9     (ctob(UPAGES)-9*sizeof(int))
                     69: #define R10    (ctob(UPAGES)-8*sizeof(int))
                     70: #define R11    (ctob(UPAGES)-7*sizeof(int))
                     71: #define AP     (ctob(UPAGES)-21*sizeof(int))
                     72: #define FP     (ctob(UPAGES)-20*sizeof(int))
                     73: #define PC     (ctob(UPAGES)-2*sizeof(int))
                     74: #define PSL    (ctob(UPAGES)-1*sizeof(int))
                     75: #define P0BR   80
                     76: #define P0LR   84
                     77: #define P1BR   88
                     78: #define P1LR   92
                     79: 
                     80: #define MAXOFF 255
                     81: #define MAXPOS 80
                     82: #define MAXLIN 128
                     83: #define EOR    '\n'
                     84: #define SP     ' '
                     85: #define TB     '\t'
                     86: #define QUOTE  0200
                     87: #define STRIP  0177
                     88: #define LOBYTE 0377
                     89: #define EVEN   -2
                     90: 
                     91: /* long to ints and back (puns) */
                     92: union {
                     93:        INT     I[2];
                     94:        L_INT   L;
                     95: } itolws;
                     96: 
                     97: #ifndef vax
                     98: #define leng(a)                ((long)((unsigned)(a)))
                     99: #define shorten(a)     ((int)(a))
                    100: #define itol(a,b)      (itolws.I[0]=(a), itolws.I[1]=(b), itolws.L)
                    101: #else
                    102: #define leng(a)                itol(0,a)
                    103: #define shorten(a)     ((short)(a))
                    104: #define itol(a,b)      (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L)
                    105: #endif
                    106: 
                    107: /* result type declarations */
                    108: L_INT          inkdot();
                    109: POS            get();
                    110: POS            chkget();
                    111: STRING         exform();
                    112: L_INT          round();
                    113: BKPTR          scanbkpt();
                    114: VOID           fault();
                    115: 
                    116: struct pcb     pcb;
                    117: int    kernel;
                    118: int    kcore;
                    119: struct pte *sbr;
                    120: int    slr;
                    121: int    masterpcbb;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.