130296Ssam /* 238917Skarels * Copyright (c) 1986, 1989 Regents of the University of California. 330296Ssam * All rights reserved. The Berkeley software License Agreement 430296Ssam * specifies the terms and conditions for redistribution. 530296Ssam * 6*41357Ssklower * @(#)defs.h 7.10 (Berkeley) 05/03/90 730296Ssam */ 830105Ssam 930105Ssam /* 1030105Ssam * adb - string table version; common definitions 1130105Ssam */ 1230105Ssam 1330105Ssam #include "param.h" 1430105Ssam #include "user.h" 1530105Ssam #include "proc.h" 1630105Ssam 1737649Smckusick #include "machine/psl.h" 1837649Smckusick #include "machine/pte.h" 1937649Smckusick 2030105Ssam #include <a.out.h> 2130105Ssam #include <ctype.h> 2230105Ssam 2330105Ssam struct pcb kdbpcb; /* must go before redef.h */ 2430105Ssam 2537499Smckusick #include "machine/kdbparam.h" 2630105Ssam 2730105Ssam /* access modes */ 2830105Ssam #define RD 0 2930105Ssam #define WT 1 3030105Ssam 3130105Ssam #define NSP 0 3230105Ssam #define ISP 1 3330105Ssam #define DSP 2 3430105Ssam #define STAR 4 3530105Ssam 3630105Ssam /* 3730105Ssam * Symbol types, used internally in calls to findsym routine. 3830105Ssam * One the VAX this all degenerates since I & D symbols are indistinct. 3930105Ssam * Basically we get NSYM==0 for `=' command, ISYM==DSYM otherwise. 4030105Ssam */ 4130105Ssam #define NSYM 0 4230105Ssam #define DSYM 1 /* Data space symbol */ 4330105Ssam #define ISYM DSYM /* Instruction space symbol == DSYM on VAX */ 4430105Ssam 4530105Ssam #define BKPTSET 1 4630105Ssam #define BKPTEXEC 2 4730105Ssam 4830115Ssam /* 4930115Ssam * setexit/reset tokens.. 5030115Ssam */ 5130115Ssam #define ERROR 1 5230115Ssam #define NEXT 6 5330105Ssam #define SINGLE 7 5430105Ssam #define CONTIN 8 5538917Skarels #define PANIC 9 5630105Ssam 5730105Ssam #define LINSIZ 256 5840185Smckusick #define MAXOFF 65535 5930105Ssam #define MAXPOS 80 6030105Ssam #define MAXLIN 256 6130105Ssam #define QUOTE 0200 6230105Ssam 6330105Ssam #define LOBYTE 0377 6430105Ssam #define STRIP 0177 6530105Ssam 6630105Ssam #define SP ' ' 6730105Ssam #define TB '\t' 6830105Ssam #define EOR '\n' 6937498Smckusick #define CTRL(c) (c&037) 7030105Ssam 7130105Ssam #define eqstr(a,b) (strcmp(a,b)==0) 7230105Ssam 7330105Ssam typedef unsigned ADDR; 7430105Ssam typedef unsigned POS; 7530105Ssam 7630105Ssam typedef struct bkpt { 7730105Ssam ADDR loc; 7830105Ssam ADDR ins; 7930105Ssam short count; 8030105Ssam short initcnt; 8130105Ssam short flag; 8230115Ssam #define MAXCOM 64 8330105Ssam char comm[MAXCOM]; 8430105Ssam struct bkpt *nxtbkpt; 8530105Ssam } BKPT, *BKPTR; 8630105Ssam 8730105Ssam typedef struct { 8830105Ssam char *rname; 8930105Ssam int *rkern; 9030105Ssam } REGLIST, *REGPTR; 9130105Ssam 92*41357Ssklower ADDR kdbmaxoff; 93*41357Ssklower ADDR kdblocalval; 94*41357Ssklower int kdbmkfault; 95*41357Ssklower long kdbvar[36]; 96*41357Ssklower char *kdberrflg; 97*41357Ssklower long kdbdot; 98*41357Ssklower int kdbdotinc; 99*41357Ssklower long kdbadrval; 100*41357Ssklower int kdbadrflg; 101*41357Ssklower long kdbcntval; 102*41357Ssklower int kdbcntflg; 10330105Ssam 10430105Ssam /* result type declarations */ 105*41357Ssklower long kdbinkdot(); 106*41357Ssklower u_int kdbget(); 107*41357Ssklower u_int kdbchkget(); 108*41357Ssklower u_int kdbbchkget(); 109*41357Ssklower char *kdbexform(); 110*41357Ssklower BKPTR kdbscanbkpt(); 11130105Ssam 112*41357Ssklower struct nlist *kdbsymtab, *kdbesymtab; 113*41357Ssklower struct nlist *kdbcursym; 114*41357Ssklower struct nlist *kdblookup(); 115