Source code of Windows XP (NT5)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
trdebug.h
Abstract: Contains debug related definitions.
Environment:
User mode
Author:
Michael Tsang (MikeTs) 13-Mar-2000
Revision History:
--*/
#ifndef _TRDEBUG_H
#define _TRDEBUG_H
//
// Macros
//
#ifdef TRDEBUG
#define TRASSERT(x) if (!(x)) \
{ \ TRDebugPrint("Assertion failed in file " \ "%s at line %d\n", \ __FILE__, __LINE__); \ } #define TRDBGPRINT(n,x) if ((n) <= giTRVerboseLevel) \
{ \ TRDebugPrint(MODNAME ": %s: ", ProcName); \ TRDebugPrint x; \ } #define TRWARNPRINT(x) { \
TRDebugPrint(MODNAME "_WARN: %s: ", \ ProcName); \ TRDebugPrint x; \ } #define TRERRPRINT(x) { \
TRDebugPrint(MODNAME "_ERR: %s: ", \ ProcName); \ TRDebugPrint x; \ DebugBreak(); \ } #else
#define TRASSERT(x)
#define TRDBGPRINT(n,x)
#define TRWARNPRINT(x)
#define TRERRPRINT(x)
#endif //ifdef TRDEBUG
//
// Exported Data Declarations
//
#ifdef TRDEBUG
extern int giTRVerboseLevel; extern NAMETABLE WMMsgNames[]; extern NAMETABLE WinTraceMsgNames[]; #endif
//
// Exported function prototypes
//
#ifdef TRDEBUG
int TRDebugPrint( IN LPCSTR format, ... );
PSZ LookupName( IN ULONG Code, IN PNAMETABLE NameTable ); #endif //ifdef TRDEBUG
#endif //ifndef _TRDEBUG_H
|