mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 13:13:24 +02:00
Merge remote repo native into ext/native/.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include "base/backtrace.h"
|
||||
|
||||
#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
#include <execinfo.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void *backtrace_buffer[128];
|
||||
|
||||
void PrintBacktraceToStderr() {
|
||||
int num_addrs = backtrace(backtrace_buffer, 128);
|
||||
backtrace_symbols_fd(backtrace_buffer, num_addrs, STDERR_FILENO);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void PrintBacktraceToStderr() {
|
||||
fprintf(stderr, "No backtrace available to print on this platform\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user