Debian Codegraph @

lldb/test/API/macosx/find-dsym/deep-bundle/main.c

raw
1 #include <MyFramework/MyFramework.h>
2 #include <unistd.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5
6 int setup_is_complete = 0;
7
8 int main(int argc, const char **argv)
9 {
10 char command[8192];
11 sprintf (command,
12 "/bin/rm -rf %s/MyFramework %s/MyFramework.framework %s/MyFramework.framework.dSYM",
13 argv[1], argv[1], argv[1]);
14 system (command);
15
16 FILE *fp = fopen (argv[2], "w");
17 fclose (fp);
18 setup_is_complete = 1;
19
20 // At this point we want lldb to attach to the process. If lldb attaches
21 // before we've removed the framework we're running against, it will be
22 // easy for lldb to find the binary & dSYM without using target.exec-search-paths,
23 // which is the point of this test.
24
25 for (int loop_limiter = 0; loop_limiter < 100; loop_limiter++)
26 sleep (1);
27
28 return foo();
29 }