int dumptrace( )
{
intnptrs =0;
void*buffer[100];
// char *buffer = malloc(sizeof(nullptr_t) * depth);
if( (nptrs =backtrace((void**)buffer,100)) <=0)
{ return-1; }
char**strings =backtrace_symbols(buffer, nptrs);
if( strings ==NULL){
return-1;
}
int j =0;
for(j =0; j < nptrs; j++){
printf("%s\n", strings[j]);
}
free(strings);
// free(buffer);
return 0;
}