1#include "dylib.h"
2#include <stdio.h>
3
4int
5doSomething()
6{
7 // Set a breakpoint here.
8 if (&absent_weak_int != NULL)
9 printf(format: "In absent_weak_int: %d\n", absent_weak_int);
10 if (absent_weak_function != NULL)
11 printf(format: "In absent_weak_func: %p\n", absent_weak_function);
12 if (&present_weak_int != NULL)
13 printf(format: "In present_weak_int: %d\n", present_weak_int);
14 if (present_weak_function != NULL)
15 printf(format: "In present_weak_func: %p\n", present_weak_function);
16
17}
18
19int
20main()
21{
22 return doSomething();
23}
24

source code of lldb/test/API/commands/expression/weak_symbols/main.c