标签:-- oid ack bsp ret ace nbsp clu 语言
#include <execinfo.h>
void my_backtrace()
{
void *buffer[100] = {NULL};
char **trace = NULL;
int i = 0;
int size = 0;
size = backtrace(buffer, 100);
trace = backtrace_symbols(buffer, size);
if (NULL == trace)
{
return;
}
for (i = 0; i < size; ++i)
{
printf("%s\n", trace[i]);
}
free(trace);
printf("----------done----------\n");
}
标签:-- oid ack bsp ret ace nbsp clu 语言
原文地址:https://www.cnblogs.com/duanqibo/p/11140613.html