1 #include <stdio.h>
2 
3 #include <chrono>
4 #include <thread>
5 
6 long double outermost_return_long_double (long double my_long_double);
7 
main(int argc,char const * argv[])8 int main (int argc, char const *argv[])
9 {
10     lldb_enable_attach();
11 
12     char my_string[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 0};
13     double my_double = 1234.5678;
14     long double my_long_double = 1234.5678;
15 
16     // For simplicity assume that any cmdline argument means wait for attach.
17     if (argc > 1)
18     {
19         volatile int wait_for_attach=1;
20         while (wait_for_attach)
21             std::this_thread::sleep_for(std::chrono::microseconds(1));
22     }
23 
24     printf("my_string=%s\n", my_string);
25     printf("my_double=%g\n", my_double);
26     outermost_return_long_double (my_long_double);
27     return 0;
28 }
29