aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/macosx/stack-corefile/main.c
blob: afc206b6de847ad5cd1ada8f5f13b2fdb602b3f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
  int stack_int = 5;
  int *heap_int = (int*) malloc(sizeof (int));
  *heap_int = 10;

  char stack_str[] = "stack string";
  char *heap_str = (char*) malloc(80);
  strcpy (heap_str, "heap string");

  return stack_int; // break here;
}