|
|
1.1 ! root 1: /* "@(#)defs.h 4.1 10/9/80" */ ! 2: # ! 3: /* ! 4: * ! 5: * UNIX debugger - common definitions ! 6: * ! 7: */ ! 8: ! 9: ! 10: ! 11: /* Layout of a.out file (fsym): ! 12: * ! 13: * header of 8 longwords ! 14: * magic number 410 ! 15: * text size ) ! 16: * data size ) padded with 0 to multiple of 4 bytes ! 17: * bss size ) ! 18: * symbol table size ! 19: * entry address ! 20: * size of text relocation info ! 21: * size of data relocation info ! 22: * ! 23: * ! 24: * header: 0 ! 25: * text: 32 ! 26: * data: 32+textsize ! 27: * text reloc: 32+textsize+datasize ! 28: * data reloc: 32+textsize+datasize+textreloc ! 29: * symbol table: 32+textsize+datasize+textreloc+datareloc ! 30: * ! 31: */ ! 32: ! 33: #include <sys/param.h> ! 34: #include <sys/dir.h> ! 35: #include <sys/psl.h> ! 36: #include <sys/user.h> ! 37: #include "mac.h" ! 38: #include "mode.h" ! 39: ! 40: ! 41: #define VARB 11 ! 42: #define VARD 13 ! 43: #define VARE 14 ! 44: #define VARM 22 ! 45: #define VARS 28 ! 46: #define VART 29 ! 47: ! 48: #define COREMAGIC 0140000 ! 49: ! 50: /* access modes */ ! 51: #define RD 0 ! 52: #define WT 1 ! 53: ! 54: /* access spaces */ ! 55: #define NSP 0 ! 56: #define ISP 1 ! 57: #define DSP 2 ! 58: ! 59: #define STAR 4 ! 60: #define STARCOM 0200 ! 61: #define DSYM 4 ! 62: #define ISYM 4 ! 63: #define ASYM 2 ! 64: #define NSYM 0 ! 65: #define ESYM (-1) ! 66: #define BKPTSET 1 ! 67: #define BKPTEXEC 2 ! 68: #define SYMSIZ 100 ! 69: #define MAXSIG 20 ! 70: ! 71: #define USERPS PSL ! 72: #define USERPC PC ! 73: #define BPT 03 ! 74: #define TBIT 020 ! 75: #define FD 0200 ! 76: ! 77: /* ptracew modes */ ! 78: #define SETTRC 0 ! 79: #define RDUSER 2 ! 80: #define RIUSER 1 ! 81: #define WDUSER 5 ! 82: #define WIUSER 4 ! 83: #define RUREGS 3 ! 84: #define WUREGS 6 ! 85: #define CONTIN 7 ! 86: #define EXIT 8 ! 87: #define SINGLE 9 ! 88: ! 89: #define FROFF (&(0->fpsr)) ! 90: #define FRLEN 25 ! 91: #define FRMAX 6 ! 92: ! 93: /* the quantities involving ctob() are located in the kernel stack. ! 94: /* the others are in the pcb. ! 95: */ ! 96: #define KSP 0 ! 97: #define ESP 4 ! 98: #define SSP 8 ! 99: #define USP (ctob(UPAGES)-5*sizeof(int)) ! 100: #define R0 (ctob(UPAGES)-18*sizeof(int)) ! 101: #define R1 (ctob(UPAGES)-17*sizeof(int)) ! 102: #define R2 (ctob(UPAGES)-16*sizeof(int)) ! 103: #define R3 (ctob(UPAGES)-15*sizeof(int)) ! 104: #define R4 (ctob(UPAGES)-14*sizeof(int)) ! 105: #define R5 (ctob(UPAGES)-13*sizeof(int)) ! 106: #define R6 (ctob(UPAGES)-12*sizeof(int)) ! 107: #define R7 (ctob(UPAGES)-11*sizeof(int)) ! 108: #define R8 (ctob(UPAGES)-10*sizeof(int)) ! 109: #define R9 (ctob(UPAGES)-9*sizeof(int)) ! 110: #define R10 (ctob(UPAGES)-8*sizeof(int)) ! 111: #define R11 (ctob(UPAGES)-7*sizeof(int)) ! 112: #define AP (ctob(UPAGES)-21*sizeof(int)) ! 113: #define FP (ctob(UPAGES)-20*sizeof(int)) ! 114: #define PC (ctob(UPAGES)-2*sizeof(int)) ! 115: #define PSL (ctob(UPAGES)-1*sizeof(int)) ! 116: #define P0BR 80 ! 117: #define P0LR 84 ! 118: #define P1BR 88 ! 119: #define P1LR 92 ! 120: ! 121: #define MAXOFF 255 ! 122: #define MAXPOS 80 ! 123: #define MAXLIN 128 ! 124: #define EOR '\n' ! 125: #define SP ' ' ! 126: #define TB '\t' ! 127: #define QUOTE 0200 ! 128: #define STRIP 0177 ! 129: #define LOBYTE 0377 ! 130: #define EVEN -2 ! 131: ! 132: ! 133: #ifndef vax ! 134: #define leng(a) ((long)((unsigned)(a))) ! 135: #define shorten(a) ((int)(a)) ! 136: #define itol(a,b) (itolws.I[0]=(a), itolws.I[1]=(b), itolws.L) ! 137: #else ! 138: #define leng(a) itol(0,a) ! 139: #define shorten(a) ((short)(a)) ! 140: #define itol(a,b) (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L) ! 141: #endif ! 142: ! 143: ! 144: ! 145: /* result type declarations */ ! 146: L_INT inkdot(); ! 147: SYMPTR lookupsym(); ! 148: SYMPTR symget(); ! 149: POS get(); ! 150: POS chkget(); ! 151: STRING exform(); ! 152: L_INT round(); ! 153: BKPTR scanbkpt(); ! 154: VOID fault(); ! 155: ! 156: ! 157: INT mkfault; ! 158: INT executing; ! 159: L_INT maxoff; ! 160: L_INT maxpos; ! 161: ADDR sigint; ! 162: ADDR sigqit; ! 163: INT wtflag; ! 164: L_INT maxfile; ! 165: L_INT maxstor; ! 166: L_INT txtsiz; ! 167: L_INT datsiz; ! 168: L_INT datbas; ! 169: L_INT stksiz; ! 170: STRING errflg; ! 171: INT magic; ! 172: L_INT entrypt; ! 173: ! 174: CHAR lastc; ! 175: ! 176: STRING symfil; ! 177: STRING corfil; ! 178: MAP txtmap; ! 179: MAP datmap;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.