[AMDGPU] Add True16 register classes.
[llvm-project.git] / lldb / test / API / python_api / process / main.cpp
blob54bf3590ad4316ffcb8c1e239c9a6f6b58b7fb0f
1 #include <stdio.h>
2 #include <stdint.h>
4 // This simple program is to test the lldb Python API related to process.
6 static char my_char = 'u';
7 char my_cstring[] = "lldb.SBProcess.ReadCStringFromMemory() works!";
8 char *my_char_ptr = (char *)"Does it work?";
9 uint32_t my_uint32 = 12345;
10 int my_int = 0;
12 int main (int argc, char const *argv[])
14 for (int i = 0; i < 3; ++i) {
15 printf("my_char='%c'\n", my_char);
16 ++my_char;
19 printf("after the loop: my_char='%c'\n", my_char); // 'my_char' should print out as 'x'.
21 return 0; // Set break point at this line and check variable 'my_char'.
22 // Use lldb Python API to set memory content for my_int and check the result.
25 char test_read (char *ptr)
27 return *ptr;
30 void test_write (char *ptr, char c)
32 *ptr = c;