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

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