1//===-- main.cpp ------------------------------------------------*- 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#include <unistd.h> 11 12int main (int argc, char const *argv[]) 13{ 14 char my_string[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 0}; 15 double my_double = 1234.5678; 16 17 // For simplicity assume that any cmdline argument means wait for attach. 18 if (argc > 1) 19 { 20 volatile int wait_for_attach=1; 21 while (wait_for_attach) 22 usleep(1); 23 } 24 25 printf("my_string=%s\n", my_string); 26 printf("my_double=%g\n", my_double); 27 return 0; 28} 29