2024-11-20 13:15:39 +00:00
|
|
|
From 2060b040f91c3751861a1c1b985c5fe8cc891d58 Mon Sep 17 00:00:00 2001
|
2021-05-18 06:42:55 +00:00
|
|
|
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
|
2024-11-20 13:15:39 +00:00
|
|
|
index 4be47258eb..b324b6b96a 100644
|
2021-05-18 06:42:55 +00:00
|
|
|
--- a/src/main.c
|
|
|
|
+++ b/src/main.c
|
2024-11-20 13:15:39 +00:00
|
|
|
@@ -47,6 +47,7 @@ static char *script_path = NULL;
|
2021-05-18 06:42:55 +00:00
|
|
|
#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,
|
2024-11-20 13:15:39 +00:00
|
|
|
@@ -381,8 +382,11 @@ shell_init_debug (const char *debug_env)
|
2021-05-18 06:42:55 +00:00
|
|
|
{ "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;
|
|
|
|
}
|
|
|
|
|
2024-11-20 13:15:39 +00:00
|
|
|
static GLogWriterOutput
|
2021-05-18 06:42:55 +00:00
|
|
|
--
|
2024-11-20 13:15:39 +00:00
|
|
|
2.45.2
|
2021-05-18 06:42:55 +00:00
|
|
|
|