Author: akhaldi
Date: Tue Sep 21 17:14:22 2010
New Revision: 48845
URL:
http://svn.reactos.org/svn/reactos?rev=48845&view=rev
Log:
[KERNEL32]
- Sylvain Petreolle: Fix debug channels for release builds.
Modified:
trunk/reactos/dll/win32/kernel32/file/bintype.c
trunk/reactos/dll/win32/kernel32/file/copy.c
trunk/reactos/dll/win32/kernel32/file/create.c
trunk/reactos/dll/win32/kernel32/file/curdir.c
trunk/reactos/dll/win32/kernel32/file/delete.c
trunk/reactos/dll/win32/kernel32/file/dir.c
trunk/reactos/dll/win32/kernel32/file/dosdev.c
trunk/reactos/dll/win32/kernel32/file/file.c
trunk/reactos/dll/win32/kernel32/file/find.c
trunk/reactos/dll/win32/kernel32/file/hardlink.c
trunk/reactos/dll/win32/kernel32/file/lock.c
trunk/reactos/dll/win32/kernel32/file/mailslot.c
trunk/reactos/dll/win32/kernel32/file/move.c
trunk/reactos/dll/win32/kernel32/file/npipe.c
trunk/reactos/dll/win32/kernel32/file/pipe.c
trunk/reactos/dll/win32/kernel32/file/rw.c
trunk/reactos/dll/win32/kernel32/file/volume.c
trunk/reactos/dll/win32/kernel32/include/kernel32.h
trunk/reactos/dll/win32/kernel32/misc/actctx.c
trunk/reactos/dll/win32/kernel32/misc/format_msg.c
trunk/reactos/dll/win32/kernel32/misc/lcformat.c
trunk/reactos/dll/win32/kernel32/misc/version.c
trunk/reactos/dll/win32/kernel32/process/session.c
Modified: trunk/reactos/dll/win32/kernel32/file/bintype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/bi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/bintype.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/bintype.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -17,7 +17,7 @@
#include <debug.h>
#if DBG
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
#endif
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/copy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/co…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/copy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/copy.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -17,7 +17,7 @@
#include <debug.h>
#if DBG
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
#endif
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/cr…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/create.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/create.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -19,7 +19,7 @@
#include <debug.h>
#if DBG
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
#endif
#define SYMLINK_FLAG_RELATIVE 1
Modified: trunk/reactos/dll/win32/kernel32/file/curdir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/cu…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/curdir.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/curdir.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -21,7 +21,7 @@
#include <debug.h>
#if DBG
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
#endif
/* GLOBAL VARIABLES **********************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/delete.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/de…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/delete.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/delete.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -14,7 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <reactos/debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/di…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/dir.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -18,7 +18,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
UNICODE_STRING DllDirectory = {0, 0, NULL};
Modified: trunk/reactos/dll/win32/kernel32/file/dosdev.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/do…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/dosdev.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/dosdev.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -14,7 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS *****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/file.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/file.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -15,7 +15,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* GLOBALS ******************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/find.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/find.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/find.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -14,7 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* TYPES ********************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/hardlink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/ha…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/hardlink.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/hardlink.c [iso-8859-1] Tue Sep 21 17:14:22
2010
@@ -14,7 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/lock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/lo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/lock.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/lock.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -16,7 +16,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/mailslot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/ma…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/mailslot.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/mailslot.c [iso-8859-1] Tue Sep 21 17:14:22
2010
@@ -13,7 +13,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/move.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/mo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/move.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/move.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -19,7 +19,7 @@
#include <malloc.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* GLOBALS *****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/npipe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/np…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -12,7 +12,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
//#define USING_PROPER_NPFS_WAIT_SEMANTICS
Modified: trunk/reactos/dll/win32/kernel32/file/pipe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/pi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/pipe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/pipe.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -13,7 +13,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* GLOBALS ******************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/rw…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/rw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/rw.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -14,7 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
Modified: trunk/reactos/dll/win32/kernel32/file/volume.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/vo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/volume.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/volume.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -22,7 +22,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32file;
+DEBUG_CHANNEL(kernel32file);
#define MAX_DOS_DRIVES 26
Modified: trunk/reactos/dll/win32/kernel32/include/kernel32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/include…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Tue Sep 21 17:14:22
2010
@@ -8,6 +8,13 @@
#define actctx 202
#define resource 203
#define kernel32session 204
+
+
+#if DBG
+#define DEBUG_CHANNEL(ch) static ULONG gDebugChannel = ch;
+#else
+#define DEBUG_CHANNEL(ch)
+#endif
#define TRACE(fmt, ...) TRACE__(gDebugChannel, fmt, ##__VA_ARGS__)
#define WARN(fmt, ...) WARN__(gDebugChannel, fmt, ##__VA_ARGS__)
Modified: trunk/reactos/dll/win32/kernel32/misc/actctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ac…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/actctx.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -15,7 +15,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = actctx;
+DEBUG_CHANNEL(actctx);
#define ACTCTX_FAKE_HANDLE ((HANDLE) 0xf00baa)
Modified: trunk/reactos/dll/win32/kernel32/misc/format_msg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/fo…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/format_msg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/format_msg.c [iso-8859-1] Tue Sep 21 17:14:22
2010
@@ -22,7 +22,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = resource;
+DEBUG_CHANNEL(resource);
struct format_args
{
Modified: trunk/reactos/dll/win32/kernel32/misc/lcformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/lc…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/lcformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/lcformat.c [iso-8859-1] Tue Sep 21 17:14:22
2010
@@ -32,7 +32,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = resource;
+DEBUG_CHANNEL(resource);
#define DATE_DATEVARSONLY 0x0100 /* only date stuff: yMdg */
#define TIME_TIMEVARSONLY 0x0200 /* only time stuff: hHmst */
Modified: trunk/reactos/dll/win32/kernel32/misc/version.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ve…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/version.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/version.c [iso-8859-1] Tue Sep 21 17:14:22 2010
@@ -11,7 +11,7 @@
#include <reactos/buildno.h>
#define NDEBUG
#include <debug.h>
-static ULONG gDebugChannel = kernel32ver;
+DEBUG_CHANNEL(kernel32ver);
#define UNICODIZE1(x) L##x
#define UNICODIZE(x) UNICODIZE1(x)
Modified: trunk/reactos/dll/win32/kernel32/process/session.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/process…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/process/session.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/process/session.c [iso-8859-1] Tue Sep 21 17:14:22
2010
@@ -11,7 +11,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
-//static ULONG gDebugChannel = kernel32session; not actually used
+//DEBUG_CHANNEL(kernel32session); not actually used
DWORD ActiveConsoleSessionId = 0;