|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1980 Regents of the University of California. ! 3: * All rights reserved. The Berkeley software License Agreement ! 4: * specifies the terms and conditions for redistribution. ! 5: */ ! 6: ! 7: #ifndef lint ! 8: static char sccsid[] = "@(#)fixbps.c 5.1 (Berkeley) 6/5/85"; ! 9: #endif not lint ! 10: /* ! 11: * fix up breakpoint information before continuing execution ! 12: * ! 13: * It's necessary to destroy breakpoints that were created temporarily ! 14: * and still exist because the program terminated abnormally. ! 15: */ ! 16: ! 17: #include "defs.h" ! 18: #include "breakpoint.h" ! 19: #include "bp.rep" ! 20: ! 21: fixbps() ! 22: { ! 23: register BPINFO *p, *last, *next; ! 24: ! 25: last = NIL; ! 26: p = bphead; ! 27: while (p != NIL) { ! 28: next = p->bpnext; ! 29: switch(p->bptype) { ! 30: case ALL_OFF: ! 31: if (p->bpline >= 0) { ! 32: --tracing; ! 33: } else { ! 34: --inst_tracing; ! 35: } ! 36: if (p->bpcond != NIL) { ! 37: delcond(TRPRINT, p->bpcond); ! 38: } ! 39: goto delete; ! 40: ! 41: case STOP_OFF: ! 42: var_tracing--; ! 43: delcond(TRSTOP, p->bpcond); ! 44: goto delete; ! 45: ! 46: case TERM_OFF: ! 47: --var_tracing; ! 48: delvar(TRPRINT, p->bpnode, p->bpcond); ! 49: goto delete; ! 50: ! 51: case CALL: ! 52: case RETURN: ! 53: case BLOCK_OFF: ! 54: case CALLPROC: ! 55: case END_BP: ! 56: ! 57: delete: ! 58: if (last == NIL) { ! 59: bphead = next; ! 60: } else { ! 61: last->bpnext = next; ! 62: } ! 63: dispose(p); ! 64: break; ! 65: ! 66: default: ! 67: last = p; ! 68: break; ! 69: } ! 70: p = next; ! 71: } ! 72: tracing = 0; ! 73: var_tracing = 0; ! 74: inst_tracing = 0; ! 75: trfree(); ! 76: condfree(); ! 77: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.