mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 15:21:40 +00:00
RISCOS: Report errors and backtrace on SIGSEGV
This commit is contained in:
parent
af038e3317
commit
5f7ae9a356
@ -27,7 +27,17 @@
|
|||||||
#include "backends/plugins/riscos/riscos-provider.h"
|
#include "backends/plugins/riscos/riscos-provider.h"
|
||||||
#include "base/main.h"
|
#include "base/main.h"
|
||||||
|
|
||||||
|
#include <unixlib/local.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
static void signal_handler(int signum) {
|
||||||
|
__write_backtrace(signum);
|
||||||
|
error("Received unexpected signal: %s, exiting", strsignal(signum));
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
signal(SIGSEGV, signal_handler);
|
||||||
|
|
||||||
// Create our OSystem instance
|
// Create our OSystem instance
|
||||||
g_system = new OSystem_RISCOS();
|
g_system = new OSystem_RISCOS();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user