-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdebug.diff
More file actions
150 lines (145 loc) · 3.51 KB
/
Copy pathdebug.diff
File metadata and controls
150 lines (145 loc) · 3.51 KB
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
diff --git a/Include/debug.h b/Include/debug.h
index 72d32b8..86a9c13 100644
--- a/Include/debug.h
+++ b/Include/debug.h
@@ -31,11 +31,7 @@
// Compile-time master switch for all DBG/DBG* logs.
// Defaults to 1 for DEBUG_MSG builds, 0 otherwise.
#ifndef DEBUG_LOGS
-#ifdef DEBUG_MSG
#define DEBUG_LOGS 1
-#else
-#define DEBUG_LOGS 0
-#endif
#endif
#if DEBUG_LOGS
@@ -99,11 +95,7 @@ enum {
DBG_MAX_ENTRIES // must alway be last !
};
-#ifdef CONFIG_RELEASE
-extern const int Debug[DBG_MAX_ENTRIES];
-#else
extern int Debug[DBG_MAX_ENTRIES];
-#endif
#if defined( SIM ) && defined ( DEBUG_MSG ) && !( UCLIBC )
void Trace( void ); // dumps the callstack
diff --git a/Source/debug.c b/Source/debug.c
index 48f3f70..08eb639 100644
--- a/Source/debug.c
+++ b/Source/debug.c
@@ -44,11 +44,13 @@
// debug flags for a non release version
#ifndef CONFIG_RELEASE
int Debug[DBG_MAX_ENTRIES] = {
- [DBG_VIDEO_PLAYER] = 0,
- [DBG_AUDIO_PLAYER] = 0,
- [DBG_PARSER] = 0,
- [DBG_STREAM] = 0,
- [DBG_SINK] = 0,
+ [DBG_VIDEO_PLAYER] = 2,
+ [DBG_AUDIO_PLAYER] = 2,
+ [DBG_PARSER] = 1,
+ [DBG_STREAM] = 2,
+ [DBG_SYNC] = 1,
+ [DBG_SINK] = 2,
+ [DBG_AUD] = 2,
[DBG_FB] = 1,
};
#endif
@@ -484,7 +486,16 @@ DECLARE_DEBUG_COMMAND_VOID( "ping", _ping );
#endif
-// fake debug flags for a release version
+// Allow runtime debug flags even in release builds when explicitly set.
#ifdef CONFIG_RELEASE
-const int Debug[DBG_MAX_ENTRIES];
+int Debug[DBG_MAX_ENTRIES] = {
+ [DBG_VIDEO_PLAYER] = 2,
+ [DBG_AUDIO_PLAYER] = 2,
+ [DBG_PARSER] = 1,
+ [DBG_STREAM] = 2,
+ [DBG_SYNC] = 1,
+ [DBG_SINK] = 2,
+ [DBG_AUD] = 2,
+ [DBG_FB] = 1,
+};
#endif
diff --git a/debug.diff b/debug.diff
index b494aae..e69de29 100644
--- a/debug.diff
+++ b/debug.diff
@@ -1,75 +0,0 @@
-diff --git a/Include/debug.h b/Include/debug.h
-index 72d32b8..c442ea6 100644
---- a/Include/debug.h
-+++ b/Include/debug.h
-@@ -31,11 +31,7 @@
- // Compile-time master switch for all DBG/DBG* logs.
- // Defaults to 1 for DEBUG_MSG builds, 0 otherwise.
- #ifndef DEBUG_LOGS
--#ifdef DEBUG_MSG
- #define DEBUG_LOGS 1
--#else
--#define DEBUG_LOGS 0
--#endif
- #endif
-
- #if DEBUG_LOGS
-@@ -99,11 +95,7 @@ enum {
- DBG_MAX_ENTRIES // must alway be last !
- };
-
--#ifdef CONFIG_RELEASE
--extern const int Debug[DBG_MAX_ENTRIES];
--#else
- extern int Debug[DBG_MAX_ENTRIES];
--#endif
-
- #if defined( SIM ) && defined ( DEBUG_MSG ) && !( UCLIBC )
- void Trace( void ); // dumps the callstack
-@@ -215,4 +207,3 @@ static inline void Dump32( unsigned long *buf , int size) {}
- #endif
-
- #endif // _DEBUG_H_
--
-diff --git a/Source/debug.c b/Source/debug.c
-index 48f3f70..08eb639 100644
---- a/Source/debug.c
-+++ b/Source/debug.c
-@@ -44,11 +44,13 @@
- // debug flags for a non release version
- #ifndef CONFIG_RELEASE
- int Debug[DBG_MAX_ENTRIES] = {
-- [DBG_VIDEO_PLAYER] = 0,
-- [DBG_AUDIO_PLAYER] = 0,
-- [DBG_PARSER] = 0,
-- [DBG_STREAM] = 0,
-- [DBG_SINK] = 0,
-+ [DBG_VIDEO_PLAYER] = 2,
-+ [DBG_AUDIO_PLAYER] = 2,
-+ [DBG_PARSER] = 1,
-+ [DBG_STREAM] = 2,
-+ [DBG_SYNC] = 1,
-+ [DBG_SINK] = 2,
-+ [DBG_AUD] = 2,
- [DBG_FB] = 1,
- };
- #endif
-@@ -484,7 +486,16 @@ DECLARE_DEBUG_COMMAND_VOID( "ping", _ping );
-
- #endif
-
--// fake debug flags for a release version
-+// Allow runtime debug flags even in release builds when explicitly set.
- #ifdef CONFIG_RELEASE
--const int Debug[DBG_MAX_ENTRIES];
-+int Debug[DBG_MAX_ENTRIES] = {
-+ [DBG_VIDEO_PLAYER] = 2,
-+ [DBG_AUDIO_PLAYER] = 2,
-+ [DBG_PARSER] = 1,
-+ [DBG_STREAM] = 2,
-+ [DBG_SYNC] = 1,
-+ [DBG_SINK] = 2,
-+ [DBG_AUD] = 2,
-+ [DBG_FB] = 1,
-+};
- #endif