函数调用栈打印(C语言)
#include <stdio.h>#include <stdlib.h>#include <execinfo.h>void print_backtrace(void){ void *bt[64]; char **btsym; int i, n; n = backtrace(bt, sizeof(bt)/sizeof(bt[0])); btsym = backtrace_symbol