Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / python_api / value / main.c
blob672b0df376dc5a207161e870323223e104b3683f
1 #include <stdio.h>
2 #include <stdint.h>
4 // This simple program is to test the lldb Python API SBValue.GetChildAtIndex().
6 int g_my_int = 100;
8 const char *days_of_week[7] = { "Sunday",
9 "Monday",
10 "Tuesday",
11 "Wednesday",
12 "Thursday",
13 "Friday",
14 "Saturday" };
16 const char *weekdays[5] = { "Monday",
17 "Tuesday",
18 "Wednesday",
19 "Thursday",
20 "Friday" };
22 const char **g_table[2] = { days_of_week, weekdays };
24 typedef int MyInt;
26 struct MyStruct
28 int a;
29 int b;
32 struct MyBiggerStruct
34 int a;
35 int b;
36 int c;
39 int main (int argc, char const *argv[])
41 uint32_t uinthex = 0xE0A35F10;
42 int32_t sinthex = 0xE0A35F10;
44 int i;
45 MyInt a = 12345;
46 struct MyStruct s = { 11, 22 };
47 struct MyBiggerStruct f = { 33, 44, 55 };
48 int *my_int_ptr = &g_my_int;
49 printf("my_int_ptr points to location %p\n", my_int_ptr);
50 int *fixed_int_ptr = (int*)(void*)0xAA;
51 int *another_fixed_int_ptr = (int*)(void*)0xAA;
52 int *a_null_int_ptr = NULL;
53 const char **str_ptr = days_of_week;
54 for (i = 0; i < 7; ++i)
55 printf("%s\n", str_ptr[i]); // Break at this line
56 // and do str_ptr_val.GetChildAtIndex(5, lldb.eNoDynamicValues, True).
58 return 0;