-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdebugger.h
More file actions
40 lines (30 loc) · 764 Bytes
/
Copy pathdebugger.h
File metadata and controls
40 lines (30 loc) · 764 Bytes
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
#ifndef clox_debugger_h
#define clox_debugger_h
#include "common.h"
#include "vec.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct Breakpoint {
char *file;
int line;
} Breakpoint;
typedef struct BreakLvl {
int ndepth;
int nwidth;
} BreakLvl;
typedef vec_t(BreakLvl) vec_breaklvl_t;
typedef struct Debugger {
bool awaitingPause;
vec_void_t v_breakpoints;
vec_breaklvl_t v_breaklvls;
} Debugger;
void initDebugger(Debugger *dbg);
void freeDebugger(Debugger *dbg); // free internal structures
bool shouldEnterDebugger(Debugger *dbg, char *fname, int curLine, int lastLine,
int ndepth, int nwidth);
void enterDebugger(Debugger *dbg, char *fname, int lineno, int ndepth, int nwidth);
#ifdef __cplusplus
}
#endif
#endif