xref: /llvm-project/lldb/test/API/macosx/stack-corefile/main.c (revision fa639eda6535732a5fd79c3f551d5a667b810963)
18c31efeeSJason Molenda #include <stdio.h>
28c31efeeSJason Molenda #include <stdlib.h>
38c31efeeSJason Molenda #include <string.h>
main()48c31efeeSJason Molenda int main() {
58c31efeeSJason Molenda   int stack_int = 5;
68c31efeeSJason Molenda   int *heap_int = (int*) malloc(sizeof (int));
78c31efeeSJason Molenda   *heap_int = 10;
88c31efeeSJason Molenda 
9*fa639edaSPavel Labath   char stack_str[] = "stack string";
108c31efeeSJason Molenda   char *heap_str = (char*) malloc(80);
118c31efeeSJason Molenda   strcpy (heap_str, "heap string");
128c31efeeSJason Molenda 
138c31efeeSJason Molenda   return stack_int; // break here;
148c31efeeSJason Molenda }
15