aboutsummaryrefslogtreecommitdiffstats
path: root/community/mate-power-manager/0001-removing-backtrace.patch
blob: 536991bc16479ac4bda1dff076b19010f6c579fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
From b8907c90dec6a7f6fc2a3c682ddb48d4ebf8406e Mon Sep 17 00:00:00 2001
From: Alan Lacerda <alacerda@alpinelinux.org>
Date: Fri, 17 Apr 2015 11:34:47 +0000
Subject: [PATCH] removing backtrace

---
 applets/brightness/egg-debug.c | 28 ----------------------------
 applets/inhibit/egg-debug.c    | 28 ----------------------------
 src/egg-debug.c                | 28 ----------------------------
 3 files changed, 84 deletions(-)

diff --git a/applets/brightness/egg-debug.c b/applets/brightness/egg-debug.c
index 3a8e6e7..b06b540 100644
--- a/applets/brightness/egg-debug.c
+++ b/applets/brightness/egg-debug.c
@@ -75,31 +75,6 @@ pk_set_console_mode (guint console_code)
 }
 
 /**
- * egg_debug_backtrace:
- **/
-void
-egg_debug_backtrace (void)
-{
-	void *call_stack[512];
-	int  call_stack_size;
-	char **symbols;
-	int i = 1;
-
-	call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
-	symbols = backtrace_symbols (call_stack, call_stack_size);
-	if (symbols != NULL) {
-		pk_set_console_mode (CONSOLE_RED);
-		g_print ("Traceback:\n");
-		while (i < call_stack_size) {
-			g_print ("\t%s\n", symbols[i]);
-			i++;
-		}
-		pk_set_console_mode (CONSOLE_RESET);
-		free (symbols);
-	}
-}
-
-/**
  * pk_log_line:
  **/
 static void
@@ -229,9 +204,6 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha
 	pk_print_line (func, file, line, buffer, CONSOLE_RED);
 	g_free(buffer);
 
-	/* we want to fix this! */
-	egg_debug_backtrace ();
-
 	exit (1);
 }
 
diff --git a/applets/inhibit/egg-debug.c b/applets/inhibit/egg-debug.c
index 3a8e6e7..b06b540 100644
--- a/applets/inhibit/egg-debug.c
+++ b/applets/inhibit/egg-debug.c
@@ -75,31 +75,6 @@ pk_set_console_mode (guint console_code)
 }
 
 /**
- * egg_debug_backtrace:
- **/
-void
-egg_debug_backtrace (void)
-{
-	void *call_stack[512];
-	int  call_stack_size;
-	char **symbols;
-	int i = 1;
-
-	call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
-	symbols = backtrace_symbols (call_stack, call_stack_size);
-	if (symbols != NULL) {
-		pk_set_console_mode (CONSOLE_RED);
-		g_print ("Traceback:\n");
-		while (i < call_stack_size) {
-			g_print ("\t%s\n", symbols[i]);
-			i++;
-		}
-		pk_set_console_mode (CONSOLE_RESET);
-		free (symbols);
-	}
-}
-
-/**
  * pk_log_line:
  **/
 static void
@@ -229,9 +204,6 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha
 	pk_print_line (func, file, line, buffer, CONSOLE_RED);
 	g_free(buffer);
 
-	/* we want to fix this! */
-	egg_debug_backtrace ();
-
 	exit (1);
 }
 
diff --git a/src/egg-debug.c b/src/egg-debug.c
index 3a8e6e7..b06b540 100644
--- a/src/egg-debug.c
+++ b/src/egg-debug.c
@@ -75,31 +75,6 @@ pk_set_console_mode (guint console_code)
 }
 
 /**
- * egg_debug_backtrace:
- **/
-void
-egg_debug_backtrace (void)
-{
-	void *call_stack[512];
-	int  call_stack_size;
-	char **symbols;
-	int i = 1;
-
-	call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
-	symbols = backtrace_symbols (call_stack, call_stack_size);
-	if (symbols != NULL) {
-		pk_set_console_mode (CONSOLE_RED);
-		g_print ("Traceback:\n");
-		while (i < call_stack_size) {
-			g_print ("\t%s\n", symbols[i]);
-			i++;
-		}
-		pk_set_console_mode (CONSOLE_RESET);
-		free (symbols);
-	}
-}
-
-/**
  * pk_log_line:
  **/
 static void
@@ -229,9 +204,6 @@ egg_error_real (const gchar *func, const gchar *file, const int line, const gcha
 	pk_print_line (func, file, line, buffer, CONSOLE_RED);
 	g_free(buffer);
 
-	/* we want to fix this! */
-	egg_debug_backtrace ();
-
 	exit (1);
 }
 
-- 
2.3.3