1*26937Smckusick /* defs.h 4.6 86/03/26 */ 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*26937Smckusick #include <sys/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*26937Smckusick /* puns from <sys/ptrace.h> */ 5017254Ssam #define CONTIN PT_CONTINUE 5117254Ssam #define SINGLE PT_STEP 5217254Ssam 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 EOR '\n' 843768Sroot #define SP ' ' 853768Sroot #define TB '\t' 863768Sroot #define QUOTE 0200 873768Sroot #define STRIP 0177 883768Sroot #define LOBYTE 0377 893768Sroot #define EVEN -2 903768Sroot 913768Sroot /* long to ints and back (puns) */ 923768Sroot union { 933768Sroot INT I[2]; 943768Sroot L_INT L; 953768Sroot } itolws; 963768Sroot 973768Sroot #ifndef vax 983768Sroot #define leng(a) ((long)((unsigned)(a))) 993768Sroot #define shorten(a) ((int)(a)) 1003768Sroot #define itol(a,b) (itolws.I[0]=(a), itolws.I[1]=(b), itolws.L) 1013768Sroot #else 1023768Sroot #define leng(a) itol(0,a) 1033768Sroot #define shorten(a) ((short)(a)) 1043768Sroot #define itol(a,b) (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L) 1053768Sroot #endif 1063768Sroot 1073768Sroot /* result type declarations */ 1083768Sroot L_INT inkdot(); 1093768Sroot POS get(); 1103768Sroot POS chkget(); 1113768Sroot STRING exform(); 1123768Sroot L_INT round(); 1133768Sroot BKPTR scanbkpt(); 1143768Sroot VOID fault(); 1153777Sroot 1163777Sroot struct pcb pcb; 1173777Sroot int kernel; 1183777Sroot int kcore; 1193777Sroot struct pte *sbr; 1203777Sroot int slr; 1213777Sroot int masterpcbb; 122