1: /* "@(#)defs.h 4.3 12/24/82" */
   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 <machine/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: #ifndef STD
 100: #define USP (ctob(UPAGES)-5*4)
 101: #define R0 (ctob(UPAGES)-18*4)
 102: #define R1 (ctob(UPAGES)-17*4)
 103: #define R2 (ctob(UPAGES)-16*4)
 104: #define R3 (ctob(UPAGES)-15*4)
 105: #define R4 (ctob(UPAGES)-14*4)
 106: #define R5 (ctob(UPAGES)-13*4)
 107: #define R6 (ctob(UPAGES)-12*4)
 108: #define R7 (ctob(UPAGES)-11*4)
 109: #define R8 (ctob(UPAGES)-10*4)
 110: #define R9 (ctob(UPAGES)-9*4)
 111: #define R10 (ctob(UPAGES)-8*4)
 112: #define R11 (ctob(UPAGES)-7*4)
 113: #define AP (ctob(UPAGES)-21*4)
 114: #define FP (ctob(UPAGES)-20*4)
 115: #define PC (ctob(UPAGES)-2*4)
 116: #define PSL (ctob(UPAGES)-1*4)
 117: #else
 118: #define USP (ctob(UPAGES)-5*4)
 119: #define R0 (ctob(UPAGES)-19*4)
 120: #define R1 (ctob(UPAGES)-18*4)
 121: #define R2 (ctob(UPAGES)-17*4)
 122: #define R3 (ctob(UPAGES)-16*4)
 123: #define R4 (ctob(UPAGES)-15*4)
 124: #define R5 (ctob(UPAGES)-14*4)
 125: #define R6 (ctob(UPAGES)-13*4)
 126: #define R7 (ctob(UPAGES)-12*4)
 127: #define R8 (ctob(UPAGES)-11*4)
 128: #define R9 (ctob(UPAGES)-10*4)
 129: #define R10 (ctob(UPAGES)-9*4)
 130: #define R11 (ctob(UPAGES)-8*4)
 131: #define AP (ctob(UPAGES)-7*4)
 132: #define FP (ctob(UPAGES)-6*4)
 133: #define PC (ctob(UPAGES)-2*4)
 134: #define PSL (ctob(UPAGES)-1*4)
 135: #endif
 136: #define P0BR 80
 137: #define P0LR 84
 138: #define P1BR 88
 139: #define P1LR 92
 140: 
 141: #define MAXOFF  255
 142: #define MAXPOS  80
 143: #define MAXLIN  128
 144: #define EOR '\n'
 145: #define SP  ' '
 146: #define TB  '\t'
 147: #define QUOTE   0200
 148: #define STRIP   0177
 149: #define LOBYTE  0377
 150: #define EVEN    -2
 151: 
 152: 
 153: #ifndef vax
 154: #define leng(a)     ((long)((unsigned)(a)))
 155: #define shorten(a)  ((int)(a))
 156: #define itol(a,b)   (itolws.I[0]=(a), itolws.I[1]=(b), itolws.L)
 157: #else
 158: #define leng(a)     itol(0,a)
 159: #define shorten(a)  ((short)(a))
 160: #define itol(a,b)   (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L)
 161: #endif
 162: 
 163: 
 164: 
 165: /* result type declarations */
 166: L_INT       inkdot();
 167: SYMPTR      lookupsym();
 168: SYMPTR      symget();
 169: POS     get();
 170: POS     chkget();
 171: STRING      exform();
 172: L_INT       round();
 173: BKPTR       scanbkpt();
 174: VOID        fault();
 175: 
 176: 
 177: INT     mkfault;
 178: INT     executing;
 179: L_INT       maxoff;
 180: L_INT       maxpos;
 181: ADDR        sigint;
 182: ADDR        sigqit;
 183: INT     wtflag;
 184: L_INT       maxfile;
 185: L_INT       maxstor;
 186: L_INT       txtsiz;
 187: L_INT       datsiz;
 188: L_INT       datbas;
 189: L_INT       stksiz;
 190: STRING      errflg;
 191: INT     magic;
 192: L_INT       entrypt;
 193: 
 194: CHAR        lastc;
 195: 
 196: STRING      symfil;
 197: STRING      corfil;
 198: MAP     txtmap;
 199: MAP     datmap;

Defined macros

ASYM defined in line 63; never used
BKPTEXEC defined in line 67; used 2 times
BKPTSET defined in line 66; used 5 times
BPT defined in line 73; used 1 times
CONTIN defined in line 85; used 2 times
COREMAGIC defined in line 48; never used
DSP defined in line 57; used 44 times
DSYM defined in line 61; used 1 times
EOR defined in line 144; used 5 times
ESP defined in line 97; used 2 times
ESYM defined in line 65; never used
EVEN defined in line 150; used 2 times
EXIT defined in line 86; used 1 times
FD defined in line 75; never used
FRLEN defined in line 90; never used
FRMAX defined in line 91; never used
FROFF defined in line 89; never used
ISP defined in line 56; used 5 times
ISYM defined in line 62; never used
KSP defined in line 96; used 2 times
LOBYTE defined in line 149; never used
MAXLIN defined in line 143; never used
MAXOFF defined in line 141; used 1 times
MAXPOS defined in line 142; used 10 times
MAXSIG defined in line 69; never used
NSP defined in line 55; used 1 times
NSYM defined in line 64; never used
P0BR defined in line 136; used 2 times
P0LR defined in line 137; used 2 times
P1BR defined in line 138; used 2 times
P1LR defined in line 139; used 2 times
PSL defined in line 134; used 3 times
QUOTE defined in line 147; never used
R1 defined in line 120; used 2 times
R10 defined in line 129; used 2 times
R11 defined in line 130; used 2 times
R2 defined in line 121; used 2 times
R3 defined in line 122; used 2 times
R4 defined in line 123; used 2 times
R5 defined in line 124; used 2 times
R6 defined in line 125; used 2 times
R7 defined in line 126; used 2 times
R8 defined in line 127; used 2 times
R9 defined in line 128; used 2 times
RD defined in line 51; used 2 times
RDUSER defined in line 79; used 1 times
RIUSER defined in line 80; used 3 times
RUREGS defined in line 83; used 3 times
SETTRC defined in line 78; used 1 times
SINGLE defined in line 87; used 3 times
SP defined in line 145; never used
SSP defined in line 98; used 2 times
STAR defined in line 59; used 1 times
STARCOM defined in line 60; never used
STRIP defined in line 148; never used
SYMSIZ defined in line 68; never used
TB defined in line 146; never used
TBIT defined in line 74; never used
USERPC defined in line 72; never used
USERPS defined in line 71; never used
USP defined in line 118; used 3 times
VARB defined in line 41; never used
VARD defined in line 42; never used
VARE defined in line 43; never used
VARM defined in line 44; never used
VARS defined in line 45; never used
VART defined in line 46; never used
WDUSER defined in line 81; used 1 times
WIUSER defined in line 82; used 3 times
WT defined in line 52; used 1 times
WUREGS defined in line 84; never used
itol defined in line 160; used 1 times
leng defined in line 158; never used
shorten defined in line 159; used 1 times

Usage of this include

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