[gnome-shell/wip/rstrode/login-screen-extensions: 68/134] main: Dump stack on segfaults by default




commit d042b1c738cae3b2c0667008bf4f51d5683f4b38
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Oct 29 18:21:06 2020 +0100

    main: Dump stack on segfaults by default

 src/main.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 2458377834..788309de7c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -39,6 +39,7 @@ static int caught_signal = 0;
 #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
 
+#define DEFAULT_SHELL_DEBUG SHELL_DEBUG_BACKTRACE_SEGFAULTS
 enum {
   SHELL_DEBUG_BACKTRACE_WARNINGS = 1,
   SHELL_DEBUG_BACKTRACE_SEGFAULTS = 2,
@@ -268,8 +269,11 @@ shell_init_debug (const char *debug_env)
     { "backtrace-segfaults", SHELL_DEBUG_BACKTRACE_SEGFAULTS },
   };
 
-  _shell_debug = g_parse_debug_string (debug_env, keys,
-                                       G_N_ELEMENTS (keys));
+  if (debug_env)
+    _shell_debug = g_parse_debug_string (debug_env, keys,
+                                         G_N_ELEMENTS (keys));
+  else
+    _shell_debug = DEFAULT_SHELL_DEBUG;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]