Add breakpoints and install handlers
问题 My high-level goal is something like this: void print_backtrace() { void *callstack[128]; int framesC = backtrace(callstack, sizeof(callstack)); printf("backtrace() returned %d addresses\n", framesC); char** strs = backtrace_symbols(callstack, framesC); for(int i = 0; i < framesC; ++i) { if(strs[i]) printf("%s\n", strs[i]); else break; } free(strs); } install_breakpoint_handler("__NSAutoreleaseNoPool", print_backtrace); So, each time the __NSAutoreleaseNoPool function breakpoint is catched,