You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
4 weeks ago
|
From 2060b040f91c3751861a1c1b985c5fe8cc891d58 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 4be47258eb..b324b6b96a 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.45.2
|
||
|
|