Display the header/footer before printing the backtrace

This commit is contained in:
smallmodel 2023-09-01 22:52:46 +02:00
parent 88438d6db4
commit 8f3142e532
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -52,9 +52,11 @@ void Sys_PrintBackTrace() {
void* backtrace_arr[20];
size_t backtrace_size;
printf("----\nBacktrace:\n");
// get void*'s for all entries on the stack
backtrace_size = backtrace(backtrace_arr, sizeof(backtrace_arr) / sizeof(backtrace_arr[0]));
backtrace_symbols_fd(backtrace_arr, backtrace_size, STDERR_FILENO);
printf("----\n");
}
/*