1int false_condition() { return 0; }
2
3int *g_watched_var_ptr;
4
5static void start_recording() {}
6
7static void trigger_watchpoint() { *g_watched_var_ptr = 2; }
8
9static void trigger_breakpoint() {}
10
11static void stop_recording() {}
12
13int main() {
14 // The watched memory location is on the stack because
15 // that's what our reverse execution engine records and
16 // replays.
17 int watched_var = 1;
18 g_watched_var_ptr = &watched_var;
19
20 start_recording();
21 trigger_watchpoint();
22 trigger_breakpoint();
23 stop_recording();
24 return 0;
25}
26

source code of lldb/test/API/functionalities/reverse-execution/main.c