-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagc_debug.h
48 lines (40 loc) · 1.54 KB
/
agc_debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef AGC_DEBUG_H
#define AGC_DEBUG_H
#define MAX_BREAKPOINTS 256
#define PATTERN_SIZE 017777777
#define PAT "%08o"
#define BP_KEEP 'k'
#define BP_DELETE 'd'
typedef struct
{
int Id; // Breakpoint identifier
int Hits; // Number of times hit
char Enable; // Flag to track the enable status of the breakpoint
char Disposition; // Breakpoint Disposition
int Address12; // A 12-bit address.
// RegBB is like the normal BB register, except that we also insert the superbank
// bit into it. In other words, it's like BB bitwise-ORred with channel 7.
// For PATTERNs, Address12 is the value we're watching for, and vRegBB is the
// mask we apply before comparing.
int vRegBB;
int WatchValue;
// WatchBreak is interpreted as follows:
// 0 for a breakpoint (i.e., stopping upon hitting a given address).
// 1 for a watchpoint wherein the contents of a given address changes value.
// 2 for a pattern (i.e., the next instruction code matches a pattern).
// 3 for a watchpoint wherein a given value is written to a given address.
// 4 for a watchpoint that displays a variable rather than halting.
int WatchBreak;
// If the "break <line>" is used, then Line will be set. If "break <symbol>"
// is used, then Symbol will be set. If a memory address is given, then both
// will be NULL.
Symbol_t *Symbol;
SymbolLine_t *Line;
}
Breakpoint_t;
extern Breakpoint_t Breakpoints[MAX_BREAKPOINTS];
extern int NumBreakpoints;
extern int HaveSymbols;
extern char *SymbolFile;
extern int SingleStepCounter;
#endif