• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <stdio.h>
2 #include <string.h>
3 
4 // This simple program is to test the lldb Python API SBSection. It includes
5 // somes global data, and so the build process produces a DATA section, which
6 // the test code can use to query for the target byte size
7 
8 char my_global_var_of_char_type = 'X';
9 
main(int argc,char const * argv[])10 int main (int argc, char const *argv[])
11 {
12     // this code just "does something" with the global so that it is not
13     // optimised away
14     if (argc > 1 && strlen(argv[1]))
15     {
16         my_global_var_of_char_type += argv[1][0];
17     }
18 
19     return my_global_var_of_char_type;
20 }
21