* Copyright (c) 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
* @(#)kdb_runpcs.c 7.3 (Berkeley) 12/15/86
printf("kdb: running\n");
* To single step, delete the
* breakpoints and invoke the
* hardware single step in the
* If we're currently at a breakpoint,
* restore the instruction and single
* step before continuing. Otherwise,
* we can just set our breakpoints and
if (bkpt
= scanbkpt(userpc
)) {
* Continue execution after a trap.
* If tracetrap is nonzero, we've entered here because of a
* trace trap. If we're skipping a breakpoint (execbkptf),
* or this is the next iteration of a breakpoint, continue.
* If this is the next iteration of a single step, do the
* next step. Otherwise return 1 if we stopped because
clrsstep(); /* clear hardware single step */
if (!tracetrap
&& (bkpt
= scanbkpt(userpc
))) {
* Stopped at a breakpoint,
if (bkpt
->flag
== BKPTEXEC
||
((bkpt
->flag
= BKPTEXEC
) && bkpt
->comm
[0] != EOR
&&
command(bkpt
->comm
, ':') && --bkpt
->count
)) {
bkpt
->count
= bkpt
->initcnt
;
runpcs(rc
? CONTIN
: SINGLE
, 1);
static int bpstate
= BPOUT
;
for (bkptr
= bkpthead
; bkptr
; bkptr
= bkptr
->nxtbkpt
)
if (bkptr
->flag
&& bkptr
->loc
== addr
)
for (bkptr
= bkpthead
; bkptr
; bkptr
= bkptr
->nxtbkpt
)
put((off_t
)a
, ISP
, (long)bkptr
->ins
);
for (bkptr
= bkpthead
; bkptr
; bkptr
= bkptr
->nxtbkpt
)
bkptr
->ins
= get(a
, ISP
);
put(a
, ISP
, (long)SETBP(bkptr
->ins
));