[retro-gtk] runner: Print a critical on crash
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] runner: Print a critical on crash
- Date: Sat, 19 Dec 2020 10:05:21 +0000 (UTC)
commit a4af27c636ecaaaa85bd23070f1a911e86938f22
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Dec 19 10:22:17 2020 +0100
runner: Print a critical on crash
This makes it more clear in the logs why a stack trace is printed, and
it will make finding it easier by acting as a colorful header.
retro-runner/retro-runner.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/retro-runner/retro-runner.c b/retro-runner/retro-runner.c
index ca1b76e..dce29dc 100644
--- a/retro-runner/retro-runner.c
+++ b/retro-runner/retro-runner.c
@@ -51,6 +51,18 @@ print_backtrace_on_crash_cb (int sig,
siginfo_t *si,
void *unused)
{
+ switch (sig) {
+ case SIGABRT:
+ g_critical ("Received signal SIGABRT, abnormal termination:");
+ break;
+ case SIGSEGV:
+ g_critical ("Received signal SIGSEGV, segmentation fault:");
+ break;
+ default:
+ g_critical ("Received unexpected signal %d:", sig);
+ break;
+ }
+
g_on_error_stack_trace (RETRO_RUNNER_PRGNAME);
exit (EXIT_FAILURE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]