xref: /llvm-project/lldb/test/API/python_api/thread/main.cpp (revision 99451b4453688a94c6014cac233d371ab4cc342d)
1 //===-- main.c --------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 #include <stdio.h>
9 
10 // This simple program is to test the lldb Python API related to thread.
11 
12 char my_char = 'u';
13 int my_int = 0;
14 
15 int main (int argc, char const *argv[])
16 {
17     for (int i = 0; i < 3; ++i) {
18         printf("my_char='%c'\n", my_char);
19         ++my_char;
20     }
21 
22     printf("after the loop: my_char='%c'\n", my_char); // 'my_char' should print out as 'x'.
23 
24     return 0; // Set break point at this line and check variable 'my_char'.
25 }
26