|
|
1.1 root 1: /*
2: * machine-dependent code for controlling a process
3: * this for vax
4: */
5:
6: #include "defs.h"
7: #include "bkpt.h"
8: #include "regs.h"
9: #include "space.h"
10: #include <sys/psl.h>
11:
12:
13: /*
14: * install (f != 0) or remove (f == 0) a breakpoint
15: */
16:
17: #define BPT 03
18:
19: extern ADDR txtsize;
20: bkput(bk, f)
21: register BKPT *bk;
22: {
23: register int sp;
24:
25: if (bk->loc < txtsize)
26: sp = CORF | INSTSP;
27: else
28: sp = CORF | DATASP;
29: if (f == 0)
30: cput(bk->loc, sp, wtoc(bk->ins));
31: else {
32: bk->ins = ctow(cget(bk->loc, sp));
33: cput(bk->loc, sp, wtoc(BPT));
34: if (errflg) {
35: printf("cannot set breakpoint: ");
36: /* stuff */
37: prints(errflg);
38: }
39: }
40: }
41:
42: /*
43: * set psl to cause a trap after one instruction
44: * needed for v8; no ioctl to step pc
45: */
46:
47: setstep()
48: {
49:
50: rput(PSL, rget(PSL) | PSL_T);
51: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.