Print backtrace to standard error
This commit is contained in:
parent
628ae59139
commit
6524044cb9
@ -205,10 +205,10 @@ void backtraceHandler(int sig)
|
||||
size = backtrace (array, 10);
|
||||
strings = (char**)backtrace_symbols (array, size);
|
||||
|
||||
printf ("Obtained %zd stack frames.\n", size);
|
||||
fprintf(stderr, "Obtained %zd stack frames.\n", size);
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
printf ("%s\n", strings[i]);
|
||||
fprintf(stderr, "%s\n", strings[i]);
|
||||
|
||||
free (strings);
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user