17 char note[NNOTE][ERRMAX];
19 /* service routines for sub process control */
21 runpcs(int runmode, int keepnote)
28 rput(cormap, mach->pc, dot);
29 dot = rget(cormap, mach->pc);
31 while (loopcnt-- > 0) {
34 if (runmode == SINGLE) {
46 runstep(dot, keepnote);
48 if ((bkpt = scanbkpt(rget(cormap, mach->pc))) != 0) {
49 execbkpt(bkpt, keepnote);
57 dot = rget(cormap, mach->pc);
71 if (bkpt->flag == BKPTTMP)
73 else if (bkpt->flag == BKPTSKIP) {
74 execbkpt(bkpt, keepnote);
76 loopcnt++; /* we didn't really stop */
80 bkpt->flag = BKPTSKIP;
82 if ((bkpt->comm[0] == EOR || command(bkpt->comm, ':') != 0)
83 && bkpt->count != 0) {
84 execbkpt(bkpt, keepnote);
89 bkpt->count = bkpt->initcnt;
97 * finish the process off;
98 * kill if still running
116 for (bk=bkpthead; bk; bk = bk->nxtbkpt)
117 if (bk->flag == BKPTTMP)
119 else if (bk->flag != BKPTCLR)
127 * start up the program to be debugged in a child
141 * skip over a breakpoint:
142 * remove breakpoints, then single step
143 * so we can put it back
146 execbkpt(BKPT *bk, int keepnote)
148 runstep(bk->loc, keepnote);
153 * find the breakpoint at adr, if any
161 for (bk = bkpthead; bk; bk = bk->nxtbkpt)
162 if (bk->flag != BKPTCLR && bk->loc == adr)
168 * remove all breakpoints from the process' address space
176 if (bpin == FALSE || pid == 0)
178 for (bk = bkpthead; bk; bk = bk->nxtbkpt)
179 if (bk->flag != BKPTCLR)
185 * install all the breakpoints
193 if (bpin == TRUE || pid == 0)
195 for (bk = bkpthead; bk; bk = bk->nxtbkpt)
196 if (bk->flag != BKPTCLR)