[KERNEL32]: Aleksey wants debug channels, I agree this is the way forward. Leverage existing NT infrastructure to enable Windows-compatible debug channel support, instead of using a UNIX-based 3rd party library. Same debug channel names as before have been re-added, but using NT Debug Filters.

svn path=/trunk/; revision=48477
This commit is contained in:
Sir Richard 2010-08-07 16:01:30 +00:00
parent 4e45370f82
commit 0be9ddc03e
25 changed files with 48 additions and 5 deletions

View file

@ -16,6 +16,8 @@
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/
/* Check whether a file is an OS/2 or a very old Windows executable

View file

@ -15,6 +15,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/

View file

@ -17,6 +17,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
#define SYMLINK_FLAG_RELATIVE 1

View file

@ -19,6 +19,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* GLOBAL VARIABLES **********************************************************/

View file

@ -14,6 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <reactos/debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/

View file

@ -10,7 +10,7 @@
#include <k32.h>
#define NDEBUG
#include <reactos/debug.h>
#include <debug.h>
/* FUNCTIONS ******************************************************************/

View file

@ -18,6 +18,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
UNICODE_STRING DllDirectory = {0, 0, NULL};

View file

@ -14,6 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS *****************************************************************/

View file

@ -15,6 +15,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* GLOBALS ******************************************************************/

View file

@ -14,6 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* TYPES ********************************************************************/

View file

@ -14,6 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/

View file

@ -16,6 +16,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/

View file

@ -13,6 +13,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/

View file

@ -19,6 +19,7 @@
#include <malloc.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* GLOBALS *****************************************************************/

View file

@ -12,6 +12,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
//#define USING_PROPER_NPFS_WAIT_SEMANTICS

View file

@ -13,6 +13,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* GLOBALS ******************************************************************/

View file

@ -14,6 +14,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
/* FUNCTIONS ****************************************************************/

View file

@ -22,6 +22,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32file;
#define MAX_DOS_DRIVES 26

View file

@ -1,9 +1,19 @@
#pragma once
#define TRACE DPRINT
#define WARN DPRINT1
#define FIXME DPRINT1
#define ERR DPRINT1
//
// Kernel32 Filter IDs
//
#define kernel32file 200
#define kernel32ver 201
#define actctx 202
#define resource 203
#define kernel32session 204
#define TRACE(fmt, ...) TRACE__(gDebugChannel, fmt, ##__VA_ARGS__)
#define WARN(fmt, ...) WARN__(gDebugChannel, fmt, ##__VA_ARGS__)
#define FIXME(fmt, ...) WARN__(gDebugChannel, fmt,## __VA_ARGS__)
#define ERR(fmt, ...) ERR__(gDebugChannel, fmt, ##__VA_ARGS__)
#define debugstr_a
#define debugstr_w
#define wine_dbgstr_w

View file

@ -15,6 +15,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = actctx;
#define ACTCTX_FAKE_HANDLE ((HANDLE) 0xf00baa)

View file

@ -22,6 +22,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = resource;
struct format_args
{

View file

@ -32,6 +32,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = resource;
#define DATE_DATEVARSONLY 0x0100 /* only date stuff: yMdg */
#define TIME_TIMEVARSONLY 0x0200 /* only time stuff: hHmst */

View file

@ -11,6 +11,7 @@
#include <reactos/buildno.h>
#define NDEBUG
#include <debug.h>
static ULONG gDebugChannel = kernel32ver;
#define UNICODIZE1(x) L##x
#define UNICODIZE(x) UNICODIZE1(x)

View file

@ -11,6 +11,7 @@
#include <k32.h>
#define NDEBUG
#include <debug.h>
//static ULONG gDebugChannel = kernel32session; not actually used
DWORD ActiveConsoleSessionId = 0;

View file

@ -107,6 +107,11 @@ RtlAssert(
#define WARN_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define TRACE_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define INFO_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define ERR__(ch, fmt, ...) DbgPrintEx(ch, DPFLTR_ERROR_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define WARN__(ch, fmt, ...) DbgPrintEx(ch, DPFLTR_WARNING_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define TRACE__(ch, fmt, ...) DbgPrintEx(ch, DPFLTR_TRACE_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define INFO__(ch, fmt, ...) DbgPrintEx(ch, DPFLTR_INFO_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#else /* not DBG */
/* On non-debug builds, we never show these */
@ -119,6 +124,11 @@ RtlAssert(
#define WARN_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define TRACE_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define INFO_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define ERR__(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define WARN__(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define TRACE__(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define INFO__(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#endif /* not DBG */
#define ASSERT_IRQL_LESS_OR_EQUAL(x) ASSERT(KeGetCurrentIrql()<=(x))