1*17254Ssam /* defs.h 4.4 84/10/13 */ 23768Sroot 33768Sroot /* 43768Sroot * adb - vax string table version; common definitions 53768Sroot */ 69854Ssam #include <machine/psl.h> 79854Ssam #include <machine/pte.h> 83768Sroot 93768Sroot #include <sys/param.h> 103768Sroot #include <sys/dir.h> 113768Sroot #include <sys/user.h> 129854Ssam 133768Sroot #include <ctype.h> 143768Sroot #include <a.out.h> 15*17254Ssam #include <ptrace.h> 163768Sroot 173768Sroot #include "mac.h" 183768Sroot #include "mode.h" 193768Sroot #include "head.h" 203768Sroot 213768Sroot /* access modes */ 223768Sroot #define RD 0 233768Sroot #define WT 1 243768Sroot 253768Sroot #define NSP 0 263768Sroot #define ISP 1 273768Sroot #define DSP 2 283768Sroot #define STAR 4 293768Sroot #define STARCOM 0200 303768Sroot 313768Sroot /* 323768Sroot * Symbol types, used internally in calls to findsym routine. 333768Sroot * One the VAX this all degenerates since I & D symbols are indistinct. 343768Sroot * Basically we get NSYM==0 for `=' command, ISYM==DSYM otherwise. 353768Sroot */ 363768Sroot #define NSYM 0 373768Sroot #define DSYM 1 /* Data space symbol */ 383768Sroot #define ISYM DSYM /* Instruction space symbol == DSYM on VAX */ 393768Sroot 403768Sroot #define BKPTSET 1 413768Sroot #define BKPTEXEC 2 423768Sroot 433768Sroot #define USERPS PSL 443768Sroot #define USERPC PC 453768Sroot #define BPT 03 463768Sroot #define TBIT 020 473768Sroot #define FD 0200 483768Sroot 49*17254Ssam /* puns from <ptrace.h> */ 50*17254Ssam #define CONTIN PT_CONTINUE 51*17254Ssam #define SINGLE PT_STEP 52*17254Ssam 533768Sroot /* the quantities involving ctob() are located in the kernel stack. */ 543768Sroot /* the others are in the pcb. */ 553768Sroot #define KSP 0 563768Sroot #define ESP 4 573768Sroot #define SSP 8 583768Sroot #define USP (ctob(UPAGES)-5*sizeof(int)) 593768Sroot #define R0 (ctob(UPAGES)-18*sizeof(int)) 603768Sroot #define R1 (ctob(UPAGES)-17*sizeof(int)) 613768Sroot #define R2 (ctob(UPAGES)-16*sizeof(int)) 623768Sroot #define R3 (ctob(UPAGES)-15*sizeof(int)) 633768Sroot #define R4 (ctob(UPAGES)-14*sizeof(int)) 643768Sroot #define R5 (ctob(UPAGES)-13*sizeof(int)) 653768Sroot #define R6 (ctob(UPAGES)-12*sizeof(int)) 663768Sroot #define R7 (ctob(UPAGES)-11*sizeof(int)) 673768Sroot #define R8 (ctob(UPAGES)-10*sizeof(int)) 683768Sroot #define R9 (ctob(UPAGES)-9*sizeof(int)) 693768Sroot #define R10 (ctob(UPAGES)-8*sizeof(int)) 703768Sroot #define R11 (ctob(UPAGES)-7*sizeof(int)) 713768Sroot #define AP (ctob(UPAGES)-21*sizeof(int)) 723768Sroot #define FP (ctob(UPAGES)-20*sizeof(int)) 733768Sroot #define PC (ctob(UPAGES)-2*sizeof(int)) 743768Sroot #define PSL (ctob(UPAGES)-1*sizeof(int)) 753768Sroot #define P0BR 80 763768Sroot #define P0LR 84 773768Sroot #define P1BR 88 783768Sroot #define P1LR 92 793768Sroot 803768Sroot #define MAXOFF 255 813768Sroot #define MAXPOS 80 823768Sroot #define MAXLIN 128 833768Sroot #define EOF 0 843768Sroot #define EOR '\n' 853768Sroot #define SP ' ' 863768Sroot #define TB '\t' 873768Sroot #define QUOTE 0200 883768Sroot #define STRIP 0177 893768Sroot #define LOBYTE 0377 903768Sroot #define EVEN -2 913768Sroot 923768Sroot /* long to ints and back (puns) */ 933768Sroot union { 943768Sroot INT I[2]; 953768Sroot L_INT L; 963768Sroot } itolws; 973768Sroot 983768Sroot #ifndef vax 993768Sroot #define leng(a) ((long)((unsigned)(a))) 1003768Sroot #define shorten(a) ((int)(a)) 1013768Sroot #define itol(a,b) (itolws.I[0]=(a), itolws.I[1]=(b), itolws.L) 1023768Sroot #else 1033768Sroot #define leng(a) itol(0,a) 1043768Sroot #define shorten(a) ((short)(a)) 1053768Sroot #define itol(a,b) (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L) 1063768Sroot #endif 1073768Sroot 1083768Sroot /* result type declarations */ 1093768Sroot L_INT inkdot(); 1103768Sroot POS get(); 1113768Sroot POS chkget(); 1123768Sroot STRING exform(); 1133768Sroot L_INT round(); 1143768Sroot BKPTR scanbkpt(); 1153768Sroot VOID fault(); 1163777Sroot 1173777Sroot struct pcb pcb; 1183777Sroot int kernel; 1193777Sroot int kcore; 1203777Sroot struct pte *sbr; 1213777Sroot int slr; 1223777Sroot int masterpcbb; 123