-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.c
60 lines (51 loc) · 804 Bytes
/
test.c
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "dwarf.h"
#include <stdint.h>
#include <stdio.h>
#include <string.h>
char foo[] = "foo";
struct xs {
int xa;
int xb;
int xc[3];
struct xs *xd;
int *xe;
char *pc;
};
int mi = 7;
struct xs nxs = {
.xb = 3,
.pc = foo,
};
struct xs mxs = {
.xa = 1,
.xb = 2,
.xc = {
3,
4,
5,
},
.xd = &nxs,
.xe = &mi,
};
int main()
{
dump(find("xs"), "mxs", &mxs);
int second = 2;
struct foo {
int a;
int b;
} foo = {
.a = 11,
.b = 22,
};
struct debug {
typeof(second) second;
typeof(foo) foo;
} debug = {
.second = second,
.foo = foo,
};
dump(find("debug"), "debug", &debug);
dump(find("int"), "mi", &mi);
return 0;
}