xref: /llvm-project/lldb/test/API/macosx/skinny-corefile/main.c (revision 9ea6dd5cfac0b233fbb148c1e2d0f81f816737c8)
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 
5 #include "present.h"
6 #include "to-be-removed.h"
7 
8 const int main_const_data = 5;
9 int main_dirty_data = 10;
main(int argc,char ** argv)10 int main(int argc, char **argv) {
11 
12   to_be_removed_init(argc);
13   present_init(argc);
14   main_dirty_data += argc;
15 
16   char *heap_buf = (char *)malloc(80);
17   strcpy(heap_buf, "this is a string on the heap");
18 
19   return to_be_removed(heap_buf, main_const_data, main_dirty_data);
20 }
21