blob: 4d5b5e6d7e9c69555993f4b0c60100762937db71 [file] [log] [blame]
Johnny Chen37f99fd2011-03-01 02:20:14 +00001//===-- main.c --------------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9#include <stdio.h>
10
11// This simple program is to test the lldb Python API related to process.
12
13char my_char = 'u';
Johnny Chencf386e22011-03-01 22:56:31 +000014int my_int = 0;
Johnny Chen37f99fd2011-03-01 02:20:14 +000015
16int main (int argc, char const *argv[])
17{
18 for (int i = 0; i < 3; ++i) {
19 printf("my_char='%c'\n", my_char);
20 ++my_char;
21 }
22
23 printf("after the loop: my_char='%c'\n", my_char); // 'my_char' should print out as 'x'.
24
25 return 0; // Set break point at this line and check variable 'my_char'.
Johnny Chencf386e22011-03-01 22:56:31 +000026 // Use lldb Python API to set memory content for my_int and check the result.
Johnny Chen37f99fd2011-03-01 02:20:14 +000027}