aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/c/find_struct_type/main.c
blob: fa009af27e17e3f592fa8df74708fa2e04f86d0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>
#include <stdlib.h>
struct mytype {
  int c;
  int d;
};

union myunion {
  int num;
  char *str;
};

typedef struct mytype MyType;

int main()
{
  struct mytype v;
  MyType *v_ptr = &v;

  union myunion u = {5};
  v.c = u.num;
  v.d = 10;
  return v.c + v.d;
}