Blame SOURCES/0001-main-Dump-stack-on-segfaults-by-default.patch

8641d3
From ba3ce64fbbce20192a55f9d438d1032c0bac0557 Mon Sep 17 00:00:00 2001
8641d3
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
8641d3
Date: Thu, 29 Oct 2020 18:21:06 +0100
8641d3
Subject: [PATCH] main: Dump stack on segfaults by default
8641d3
8641d3
---
8641d3
 src/main.c | 8 ++++++--
8641d3
 1 file changed, 6 insertions(+), 2 deletions(-)
8641d3
8641d3
diff --git a/src/main.c b/src/main.c
8641d3
index 245837783..788309de7 100644
8641d3
--- a/src/main.c
8641d3
+++ b/src/main.c
8641d3
@@ -39,6 +39,7 @@ static int caught_signal = 0;
8641d3
 #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
8641d3
 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
8641d3
 
8641d3
+#define DEFAULT_SHELL_DEBUG SHELL_DEBUG_BACKTRACE_SEGFAULTS
8641d3
 enum {
8641d3
   SHELL_DEBUG_BACKTRACE_WARNINGS = 1,
8641d3
   SHELL_DEBUG_BACKTRACE_SEGFAULTS = 2,
8641d3
@@ -268,8 +269,11 @@ shell_init_debug (const char *debug_env)
8641d3
     { "backtrace-segfaults", SHELL_DEBUG_BACKTRACE_SEGFAULTS },
8641d3
   };
8641d3
 
8641d3
-  _shell_debug = g_parse_debug_string (debug_env, keys,
8641d3
-                                       G_N_ELEMENTS (keys));
8641d3
+  if (debug_env)
8641d3
+    _shell_debug = g_parse_debug_string (debug_env, keys,
8641d3
+                                         G_N_ELEMENTS (keys));
8641d3
+  else
8641d3
+    _shell_debug = DEFAULT_SHELL_DEBUG;
8641d3
 }
8641d3
 
8641d3
 static void
8641d3
-- 
8641d3
2.29.2
8641d3