在头文件"execinfo.h"中声明了三个函数用于获取当前线程的函数调用堆栈。
#include
int backtrace(void **buffer, int size);
char **backtrace_symbols(void *const *buffer, int size);
void backtrace_symbols_fd(void *const *buffer, int size, int fd);
man 帮助:
DESCRIPTION
backtrace() returns a backtrace for the calling program ...
2017-1-23
4470
0
回复
|