xref: /llvm-project/lldb/test/API/commands/target/stop-hooks/main.c (revision bcce8e0fccc1d6c2f18ade0ffa7039fb705bade2)
1 #include <stdio.h>
2 
3 static int g_var = 0;
4 
step_out_of_me()5 int step_out_of_me()
6 {
7   return g_var; // Set a breakpoint here and step out.
8 }
9 
10 void
increment_gvar()11 increment_gvar() {
12   g_var++;
13 }
14 
15 int
main()16 main()
17 {
18   int result = step_out_of_me(); // Stop here first
19   increment_gvar(); // Continue to here
20   return result;
21 }
22