blob: 520e3415bf02651873999607708d4ef82ee46a39 (
plain)
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
|
int false_condition() { return 0; }
int *g_watched_var_ptr;
static void start_recording() {}
static void trigger_watchpoint() { *g_watched_var_ptr = 2; }
static void trigger_breakpoint() {}
static void stop_recording() {}
int main() {
// The watched memory location is on the stack because
// that's what our reverse execution engine records and
// replays.
int watched_var = 1;
g_watched_var_ptr = &watched_var;
start_recording();
trigger_watchpoint();
trigger_breakpoint();
stop_recording();
return 0;
}
|