|
|
1.1 root 1: /* Copyright (c) 1982 Regents of the University of California */
2:
3: /* static char sccsid[] = "@(#)breakpoint.h 1.2 1/18/82"; */
4:
5: /*
6: * Breakpoint module definitions.
7: *
8: * This module contains routines that manage breakpoints at a high level.
9: * This includes adding and deleting breakpoints, handling the various
10: * types of breakpoints when they happen, management of conditions for
11: * breakpoints, and display information after single stepping.
12: */
13:
14: unsigned short tracing;
15: unsigned short var_tracing;
16: unsigned short inst_tracing;
17:
18: BOOLEAN isstopped;
19:
20: #define ss_lines (tracing != 0)
21: #define ss_variables (var_tracing != 0)
22: #define ss_instructions (inst_tracing != 0)
23: #define single_stepping (ss_lines || ss_variables || ss_instructions)
24:
25: /*
26: * types of breakpoints
27: */
28:
29: typedef enum {
30: ALL_ON, /* turn TRACE on */
31: ALL_OFF, /* turn TRACE off */
32: INST, /* trace instruction (source line) */
33: CALL, RETURN, /* trace procedure/function */
34: BLOCK_ON, /* set CALL breakpoint */
35: BLOCK_OFF, /* clear CALL breakpoint */
36: TERM_ON, /* turn TRACEVAR on */
37: TERM_OFF, /* turn TRACEVAR off */
38: AT_BP, /* print expression at a line */
39: STOP_BP, /* stop execution */
40: CALLPROC, /* return from a "call"-ed procedure */
41: END_BP, /* return from program */
42: STOP_ON, /* start looking for stop condition */
43: STOP_OFF, /* stop looking for stop condition */
44: } BPTYPE;
45:
46: /*
47: * Things that are on the tracing or condition list are either
48: * associated with the trace (implying printing) or stop commands.
49: */
50:
51: typedef enum { TRPRINT, TRSTOP } TRTYPE;
52:
53: /*
54: * routines available from this module
55: */
56:
57: addvar(); /* add a variable to the trace list */
58: delvar(); /* delete a variable from the trace list */
59: printvarnews(); /* print out variables that have changed */
60: trfree(); /* free the entire trace list */
61: addcond(); /* add a condition to the list */
62: delcond(); /* delete a condition from the list */
63: BOOLEAN trcond(); /* determine if any trace condition is true */
64: BOOLEAN stopcond(); /* determine if any stop condition is true */
65:
66: addbp(); /* add a breakpoint */
67: delbp(); /* delete a breakpoint, return FALSE if unsuccessful */
68: bpfree(); /* free all breakpoint information */
69: setallbps(); /* set traps for all breakpoints */
70: unsetallbps(); /* remove traps at all breakpoints */
71: BOOLEAN bpact(); /* handle a breakpoint */
72: fixbps(); /* destroy temporary breakpoints left after a fault */
73: status(); /* list items being traced */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.