1 #ifndef YACASL2_MONITOR_H_INCLUDE
2 #define YACASL2_MONITOR_H_INCLUDE
3
4 #include <stdio.h>
5 #include <string.h>
6 #include <assert.h>
7 #include "assemble.h"
8 #include "exec.h"
9 #include "load.h"
10
11
12
13
14 enum {
15 MONARGSIZE = 3,
16 };
17
18
19
20
21 typedef struct {
22 int argc;
23 char *argv[MONARGSIZE];
24 } MONARGS;
25
26
27
28
29 typedef struct {
30 char *cmd;
31 MONARGS *args;
32 } MONCMDLINE;
33
34
35
36
37 typedef struct _BPSLIST {
38 struct _BPSLIST *next;
39 WORD adr;
40 } BPSLIST;
41
42
43
44
45 enum {
46 BPSTABSIZE = 251,
47 };
48
49 enum {
50 MONINSIZE = 40
51 };
52
53 typedef enum {
54 MONREPEAT = 0,
55 MONNEXT = 1,
56 MONQUIT = 2,
57 } MONCMDTYPE;
58
59
60
61
62
63
64
65
66 unsigned adrhash(WORD adr);
67
68
69
70
71
72
73
74
75 MONARGS *monargstok(const char *str);
76
77
78
79
80
81
82
83
84 MONCMDLINE *monlinetok(const char *line);
85
86
87
88
89
90
91
92
93
94 MONCMDTYPE monitorcmd(char *cmd, MONARGS *args);
95
96
97
98
99
100
101
102
103 bool getbps(WORD adr);
104
105
106
107
108
109
110
111
112 bool addbps(WORD adr);
113
114
115
116
117
118
119
120
121
122 bool delbps(WORD adr);
123
124
125
126
127
128
129 void freebps();
130
131
132
133
134
135
136 void monitor();
137
138 #endif