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

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