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