J :
* Add a useful method.
This commit is contained in:
@@ -70,4 +70,19 @@ if(fichier2){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef LINUX
|
||||
|
||||
#include <execinfo.h>
|
||||
void dumpStack()
|
||||
{
|
||||
void* buffer[50];
|
||||
int s = backtrace(buffer, 50);
|
||||
char** tab = backtrace_symbols(buffer, s);
|
||||
for (int i = 1; i < s; ++i) printf("%s\n", tab[i]);
|
||||
printf("\n");
|
||||
free(tab);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user