gnome-shell/0001-main-Dump-stack-on-segfaults-by-default.patch

39 lines
1.2 KiB
Diff
Raw Normal View History

From 4c9b458862942ed8dafc13d6475a476843894977 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 29 Oct 2020 18:21:06 +0100
Subject: [PATCH] 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 10b5f6eb0f..51b0f8d41b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -47,6 +47,7 @@ static char *script_path = NULL;
#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,
@@ -381,8 +382,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 GLogWriterOutput
--
2.44.0