brintos

brintos / llvm-project-archived public Read only

0
0
Text · 533 B · 520e341 Raw
26 lines · c
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 because15  // that's what our reverse execution engine records and16  // 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