Files
mars-nwe/include/core/pssDebug.h
Mario Fetka e9e4baa844
All checks were successful
Source release / source-package (push) Successful in 1m30s
0489 core: import NSS production debug header base
2026-06-13 21:14:20 +02:00

826 lines
24 KiB
C

/****************************************************************************
|
| (C) Copyright 1985, 1991, 1993, 1996 Novell, Inc.
| All Rights Reserved.
|
| This program is free software; you can redistribute it and/or
| modify it under the terms of version 2 of the GNU General Public
| License as published by the Free Software Foundation.
|
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
|
| You should have received a copy of the GNU General Public License
| along with this program; if not, contact Novell, Inc.
|
| To contact Novell about this file by physical or electronic mail,
| you may find current contact information at www.novell.com
|
|***************************************************************************
|
| NetWare Advance File Services (NSS) module
|
|---------------------------------------------------------------------------
|
| $Author: vandana $
| $Date: 2005-08-10 01:03:51 +0530 (Wed, 10 Aug 2005) $
|
| $RCSfile$
| $Revision: 1177 $
|
|---------------------------------------------------------------------------
| This module is used to:
| NSS Library source
|
| WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
| This header file should ONLY be used for NSS internal development.
| This includes Semantic Agents (SA) and Loadable Storage Services (LSS).
| Any other use may cause conflicts which NSS will NOT fix.
+-------------------------------------------------------------------------*/
#ifndef _PSSDEBUG_H_
#define _PSSDEBUG_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _OMNI_H_
# include <omni.h>
#endif
#if NSS_DEBUG IS_ENABLED
#ifndef _SCHEDULE_H_
# include <schedule.h>
#endif
#ifndef _XSTDIO_H_
# include <xStdio.h>
#endif
#ifndef _INLINES_H_
# include <inlines.h>
#endif
#endif
/* Pre-define struct(s) so Linux compiler doesn't complain */
struct ScreenStruct;
struct StackFrame;
/*- internal prototype -*/
extern void freeDebugContext();
/* basic I/O device to do debug output to*/
extern struct WFile_s *DBG_DbgScreen;
/* basic MACROS for doing I/O*/
#if NSS_DEBUG IS_ENABLED
# define PRINT(attr) DBG_DebugPrintf(attr,
#else
# define PRINT(attr) LB_aprintf(attr,
#endif
#define PRSEQ(attr) DBG_prseq(), DBG_DebugPrintf(attr,
typedef struct DebugEntryHeader_s
{
LONG DEH_attribute;
LONG DEH_utc; /* UTC time of debug print call */
QUAD DEH_mask;
WORD DEH_length; /* Length of STRING (includes NULL) */
} DebugEntryHeader_s;
typedef struct DebugEntryTail_s
{
WORD DET_length; /* Length of STRING (includes NULL) */
} DebugEntryTail_s;
#define MAX_LOG_ELEMENT_SIZE (1024)
#define MAX_LOG_ENTRY_SIZE (MAX_LOG_ELEMENT_SIZE + sizeof(DebugEntryHeader_s) + sizeof(DebugEntryTail_s))
/* EOS is End Of String */
#define DBG_EOS_INDEX_FROM_TAIL (-2) /* Location of strings last non-NULL
* character relative to the records
* tail pointer.
*/
#define DBG_EOS_INDEX_PREV(_index) \
(((_index) - sizeof(DebugEntryTail_s)) + DBG_EOS_INDEX_FROM_TAIL)
#define DBG_EOS_CHAR_PREV(_index) \
DBG_debugLogBuffer[DBG_EOS_INDEX_PREV(_index)]
#define DBG_EOS_INDEX_OF_END_RECORD() \
(DBG_debugLogEndRecordTail + DBG_EOS_INDEX_FROM_TAIL)
#define DBG_EOS_CHAR_OF_END_RECORD() \
DBG_debugLogBuffer[DBG_EOS_INDEX_OF_END_RECORD()]
#define DBG_BEGIN_LINE(_current) \
(_current == DBG_debugLogBufferRemove) || \
(DBG_EOS_CHAR_PREV(_current) == 0x0A) )
#define DBG_TIME_NONE 0
#define DBG_TIME_PARTIAL 1
#define DBG_TIME_FULL 2
extern void DBG_prseq(void);
//extern int DBG_grabdebug(void);
//extern int bugAbort(char *what, int error);
extern int DBG_fatal(char *where, char *string, int errCode);
extern int DBG_error(char *where, char *string, int value);
//extern int debug(char *what);
//extern int here(char *where);
//extern int stop(char *where);
//extern int pr(char *what);
//extern int tr(char *what);
//extern int prx(char *what, unsigned value);
//extern int prd(char *what, unsigned value);
//extern int prc(char *what, char value);
//extern int prs(char *what, char *value);
//extern int debugCount(char *what);
extern void DBG_Startup(void);
extern void DBG_Shutdown(void);
extern void DBG_Denter(char *where, QUAD trace, char *name);
extern void DBG_Dindent(void);
extern void DBG_Dexit(char *where);
extern void DBG_DrtnVoid(char *where);
extern void DBG_DrtnSNINT(char *where, SNINT returnCode);
extern void DBG_DrtnNINT(char *where, NINT returnCode);
extern void DBG_DrtnStatus(char *where, STATUS status);
extern void DBG_DrtnPtr(char *where, void *returnCode);
extern void DBG_DrtnQUAD(char *where, QUAD returnCode);
#define DBG_LOG_MAX_DISP_LINES 8 /* Used to clear area for '=s' command
* display information.
*/
extern LONG DBG_IsDOSFATLoaded( );
//int ztrace(char *msg, Zid_t zid, Blknum_t logical, Blknum_t physical);
//void zdumpMap();
extern char *DBG_DebugFormatBinary(char *buf,NINT len);
extern void DBG_SaveDebugLogToFile(struct ScreenStruct *debugScreen);
extern void DBG_DumpLogBuffer(struct ScreenStruct *debugScreen);
extern void DBG_DebugLogProcessBuffer(void);
extern void DBG_InitDebug(void);
extern void DBG_FlushDebug(void);
extern void DBG_UninitDebug(void);
extern LONG DBG_DoNSSDebuggerCommand(
struct ScreenStruct *debugScreen,
char *commandLine,
struct StackFrame *StkFrm);
//extern void printBitMap(NINT *map, NINT numBits);
extern int DBG_Depth;
extern int DBG_printDebug(char *string);
extern NINT DBG_Sequence;
extern NINT DBG_DebugLogBufferSize;
extern QUAD DBG_DebugFlag;
extern QUAD DBG_SavedDebugFlag;
extern QUAD DBG_TraceFlag;
extern QUAD DBG_SavedTraceFlag;
extern BOOL DBG_ScreenDebug;
extern BOOL DBG_DebugEnabled;
extern BOOL DBG_TraceEnabled;
//extern NINT DBG_Audit;
//extern NINT DBG_TraceLevel;
extern NINT DBG_PageSize;
extern BOOL DBG_Paging;
//extern NINT DBG_Matcher;
extern BOOL DBG_Stub;
//extern BYTE *DBG_debugLogStack;
extern BYTE *DBG_debugLogBuffer;
extern NINT DBG_debugLogBufferInsert;
extern NINT DBG_debugLogBufferRemove;
extern NINT DBG_debugLogMask;
//extern char *DBG_DebugWhere;
extern char DBG_NotImpDbgMsg[];
//extern char DBG_StubbedMsg[];
/* Routines to hook TRACING of NCPS */
extern void DBG_HookNCPTrace(void);
extern void DBG_UnHookNCPTrace(void);
extern void DBG_HookNCPLog(void);
extern void DBG_UnHookNCPLog(void);
/****************************************************************************
* Defines for tracing & debug
****************************************************************************/
#define TDEFAULT UI64_CONST(0x0000000000000001) /* Default value when DBG_DebugPrintf
* is called directly.
*/
#define TCACHE UI64_CONST(0x0000000000000002)
#define TFSM UI64_CONST(0x0000000000000004)
#define TBOND UI64_CONST(0x0000000000000008)
#define TZLOG UI64_CONST(0x0000000000000010) /* zfs logging system */
#define TZCB UI64_CONST(0x0000000000000020) /* Entry points into Beast B-tree */
#define TZTREE UI64_CONST(0x0000000000000040) /* Beast B-tree */
#define TBIO UI64_CONST(0x0000000000000080) /* Beast IO */
#define TAUTH UI64_CONST(0x0000000000000100) /* ZAS Auth System */
#define TCOMMON UI64_CONST(0x0000000000000200)
#define TZPOOL UI64_CONST(0x0000000000000400)
#define TZVOL UI64_CONST(0x0000000000000800)
#define TXACTION UI64_CONST(0x0000000000001000)
#define TZPOOLIO UI64_CONST(0x0000000000002000)
#define TNAMING UI64_CONST(0x0000000000004000)
#define TZFREETREE UI64_CONST(0x0000000000008000)
#define TLOCKING UI64_CONST(0x0000000000010000)
#define TMAL UI64_CONST(0x0000000000020000)
#define TNWSAAPI UI64_CONST(0x0000000000040000) /* NWSA NLM APIs */
#define TPLOG UI64_CONST(0x0000000000080000) /* purge log */
#define TZLOG2 UI64_CONST(0x0000000000100000) /* ZLOG extra hex dump */
#define TADMVOL UI64_CONST(0x0000000000200000)
#define TNCP UI64_CONST(0x0000000000400000) /* NWSA NCPs */
#define TCNTRL UI64_CONST(0x0000000000800000) /* control.c */
#define TWILD UI64_CONST(0x0000000001000000) /* wildcarding */
#define TMATCHATTR UI64_CONST(0x0000000002000000) /* match attributes */
#define TTIMER UI64_CONST(0x0000000004000000) /* timer */
#define TCREATE UI64_CONST(0x0000000008000000) /* create debug */
#define TNAMETREE UI64_CONST(0x0000000010000000) /* Name Tree */
#define TNAMECACHE UI64_CONST(0x0000000020000000) /* Name cache */
#define TLOCK UI64_CONST(0x0000000040000000) /* Locking */
#define TYIELDS UI64_CONST(0x0000000080000000)
#define TDELETE UI64_CONST(0x0000000100000000) /* common delete stuff */
#define TUSERSPC UI64_CONST(0x0000000200000000) /* user space restrictions */
#define TLVOLUMES UI64_CONST(0x0000000400000000) /* Common Logical Volume items */
#define TPOOL UI64_CONST(0x0000000800000000) /* Common Pool items */
#define TUSERX UI64_CONST(0x0000001000000000) /* User tasks and xations */
#define TLATCH UI64_CONST(0x0000002000000000)
#define TVIRT UI64_CONST(0x0000004000000000) /* virtual file */
#define TCONNECT UI64_CONST(0x0000008000000000) /* connection info */
#define TUXACTION UI64_CONST(0x0000010000000000) /* user transaction debug */
#define TLVDELETE UI64_CONST(0x0000020000000000) /* LV delete info */
#define TZAPI UI64_CONST(0x0000080000000000) /* zAPIs */
#define TNWSACHAIN UI64_CONST(0x0000100000000000) /* NWSA chain to legacy calls */
#define TDIRQCACHE UI64_CONST(0x0000200000000000) /* directory quota */
#define TCIFS UI64_CONST(0x0000400000000000) /* CIFS SMB packets */
#define TPSA UI64_CONST(0x0000800000000000)
#define TALL UI64_CONST(0xffffffffffffffff)
#define TNONE UI64_CONST(0)
#define TZLOG_COLOR CYAN
#define TZLOG2_COLOR LGREEN
#define NAME(_x_) static char __NAME__[] = #_x_;
#define ABORT(_err_) DBG_bugAbort(WHERE " " #_err_, _err_)
#define ERR(_string_, _err_) DBG_error(WHERE, _string_, _err_)
#define NSS_ERROR(_err_) DBG_error(WHERE, #_err_, _err_) ///Abhijit 12/21/98 Error by OS
#define ERRNULL(_string_) DBG_error(WHERE, _string_, 0)
#define FATAL(_string_, _err_) DBG_fatal(WHERE, _string_, _err_)
char *DBG_UTCTime2Str(
Time_t utcTime,
char *str);
#if NSS_DEBUG IS_ENABLED
#define NOT_IMPLEMENTED() /*fatal*/DBG_error(WHERE, DBG_NotImpDbgMsg, 0)
#ifdef UNIX
#define CHOKE_DEBUG_LOG() ((void)0)
#define DBGLOCK() ((void)0)
#define DBGUNLOCK() ((void)0)
#define INITDBGIO() ((void)0)
#else
#define CHOKE_DEBUG_LOG() ((void)0)
#define DBGLOCK() \
ASSERT_MPKNSS_LOCK(); \
wLock(DBG_DbgScreen);
#define DBGUNLOCK() wUnlock(DBG_DbgScreen)
#define INITDBGIO() ((DBG_DbgScreen == NULL) ? DBG_InitDebug() : (void)0)
#endif
//#define STUBBED() if (DBG_Stub) DBG_error(WHERE, DBG_StubbedMsg, 0)
/* defines for debugLogMask */
#define DEBUG_LOG_MEMORY 1
#define DEBUG_LOG_SCREEN 2
/* The "_ioprms" must contains the following fields:
* (color,formatstr,optParameters)
* They are used for printing information to the trace or log display */
#if 0
//#define DEBUG_PRINTF(_dmask,_ioprms) \
// if (DBG_DebugFlag & (_dmask)) \
// { \
// DebugPrintf _ioprms; \
// }
#endif
extern QUAD DBG_ScreenSwitches;
#define DBG_SS_WHERE 0x00000001
#define DBG_SS_UTC 0x00000002
#define DBG_SS_MASK 0x00000004
extern QUAD DBG_DebugMask;
#define DBG_NOINDENT 0x01 /* use the debug mask -- do not indent */
#define DBG_INDENT 0x02 /* use the debug mask -- indent if trace on */
#define DBG_TRACE_NOINDENT 0x04 /* use the trace mask -- don't indent*/
#define DBG_TRACE 0x08 /* use the trace mask -- indent*/
#define DBG_BOTH_NOINDENT 0x10 /* use the trace mask and the debug mask -- don't indent*/
#define DBG_BOTH 0x20 /* use the trace mask and the debug mask -- indent if trace on*/
#define DEBUG_PRINTF(_mask,_flag,_ioprms) \
{ \
NINT _temp_; \
BOOL _printFlag_=FALSE; \
_temp_ = (_flag); \
if (DBG_TraceFlag & (_mask)) \
{ \
if (_temp_ & (DBG_TRACE | DBG_BOTH)) \
{ \
DBG_DebugMask = _mask; \
INDENT(); DBG_prseq(); \
} \
if (_temp_ & (DBG_TRACE | DBG_TRACE_NOINDENT | DBG_BOTH_NOINDENT | DBG_BOTH)) \
{ \
DBG_DebugMask = _mask; \
DBG_DebugPrintf _ioprms; \
_printFlag_ = TRUE; \
} \
} \
if ((DBG_DebugFlag & (_mask)) && !_printFlag_) \
{ \
if ((_temp_ & (DBG_INDENT | DBG_BOTH)) && DBG_TraceFlag) \
{ \
DBG_DebugMask = _mask; \
INDENT(); DBG_prseq(); \
} \
if (_temp_ & (DBG_INDENT | DBG_BOTH | DBG_NOINDENT | DBG_BOTH_NOINDENT)) \
{ \
DBG_DebugMask = _mask; \
DBG_DebugPrintf _ioprms; \
} \
} \
}
#if 0
//#define TRACE_NOINDENT_PRINTF(_dmask,_tmask,_ioprms) \
// if ((DBG_DebugFlag & (_dmask)) || (DBG_TraceFlag & (_tmask))) \
// { \
// DBG_DebugPrintf _ioprms; \
// }
#endif
#define DEBUG_HEX_DUMP(_dmask, _color, _mode, _memory, _len) \
if (DBG_DebugFlag & (_dmask)) \
{ \
DBG_DebugHexDump( _dmask, _color, _mode, _memory, _len); \
}
/* Defines for Debug Hex Dump's Debug Mode flag */
#define DHD_DM_BYTE 0x0001
#define DHD_DM_ASCII 0x8000
extern void DBG_DebugHexDump(
NINT debugMask,
NINT debugColor,
NINT displayMode,
void *userArea,
int len );
/* basic I/O routine for output to the PSS screen, do NOT call this directly*/
extern void DBG_DebugPrintf(
NINT attr,
const char *formatStr,
...);
/* basic I/O routine for output to the NSS Debug Screen */
extern void DBG_ScreenAPrintf(
char *maskString,
char *where,
NINT attr,
const char *formatStr,
...);
/*-------------------------------------------------------------------------
* Macros used for TRACING code to the trace screen.
*-------------------------------------------------------------------------*/
#if 0
#define ENTER(_tmask, _s_) \
{ \
/*CHECK_INTERRUPTS();*/ \
if (DBG_TraceFlag != TNONE) \
{ \
DBG_Denter(WHERE, _tmask, # _s_);\
} \
}
#endif
#define ENTER(_tamsk, _s_) \
{ \
extern int pr(const char *); \
pr(WHERE # _s_); \
}
#define INDENT() (DBG_Dindent())
/*
* The exit routines prepare to return but
* don't return. Useful in our MP code.
*/
#define EXIT_VOID() \
{ \
if (DBG_TraceFlag != TNONE) \
DBG_DrtnVoid(WHERE); \
}
#define RTN_VOID() \
{ \
/*CHECK_INTERRUPTS();*/ \
if (DBG_TraceFlag != TNONE) \
DBG_DrtnVoid(WHERE); \
return; \
}
#define RTN_SNINT(_i) \
{ \
SNINT __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnSNINT(WHERE, __i); \
return __i; \
}
#define RTN_NINT(_i) \
{ \
NINT __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
return __i; \
}
#define RTN_BLOCK(_i) \
{ \
Blknum_t __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
return __i; \
}
#define RTN_BYTE(_i) \
{ \
BYTE __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
return __i; \
}
#define RTN_BOOL(_i) \
{ \
BOOL __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
return __i; \
}
#define RTN_STATUS(_i) \
{ \
STATUS __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnStatus(WHERE, __i); \
return __i; \
}
#define RTN_PTR(_p) \
{ \
void *__p = (_p); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnPtr(WHERE, __p); \
return __p; \
}
#define RTN_LONG(_i) \
{ \
NINT __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
return __i; \
}
#define RTN_ZID(_i) \
{ \
Zid_t __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnQUAD(WHERE, __i); \
return __i; \
}
#define RTN_MPKUNLOCK_VOID() \
{ \
/*CHECK_INTERRUPTS();*/ \
if (DBG_TraceFlag != TNONE) \
DBG_DrtnVoid(WHERE); \
MPKNSS_UNLOCK(); \
return; \
}
#define RTN_MPKUNLOCK_SNINT(_i) \
{ \
SNINT __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnSNINT(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#define RTN_MPKUNLOCK_NINT(_i) \
{ \
NINT __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#define RTN_MPKUNLOCK_BLOCK(_i) \
{ \
Blknum_t __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#define RTN_MPKUNLOCK_BYTE(_i) \
{ \
BYTE __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#define RTN_MPKUNLOCK_BOOL(_i) \
{ \
BOOL __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#define RTN_MPKUNLOCK_STATUS(_i) \
{ \
STATUS __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnStatus(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#define RTN_MPKUNLOCK_PTR(_p) \
{ \
void *__p = (_p); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnPtr(WHERE, __p); \
MPKNSS_UNLOCK(); \
return __p; \
}
#define RTN_MPKUNLOCK_LONG(_i) \
{ \
NINT __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnNINT(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#define RTN_MPKUNLOCK_ZID(_i) \
{ \
Zid_t __i = (_i); \
/*CHECK_INTERRUPTS();*/ \
\
if (DBG_TraceFlag != TNONE) \
DBG_DrtnQUAD(WHERE, __i); \
MPKNSS_UNLOCK(); \
return __i; \
}
#if 0
//#define DEBUG(_x_) ((void) (zDebug && (_x_)))
//#define BUG(_x_) ((void)((_x_) && debug(WHERE " " #_x_)))
//#define PRx(_x_) (prx(WHERE " " #_x_, (unsigned long)_x_))
//#define PRd(_x_) (prd(WHERE " " #_x_, (unsigned long)_x_))
//#define PRc(_x_) (prc(WHERE " " #_x_, (char)_x_))
//#define PRs(_x_) (prs(WHERE " " #_x_, (char *)_x_))
//#define PR(_s_) (pr(WHERE " " #_s_))
//#define HERE (here(WHERE))
//#define STOP (stop(WHERE))
//
//#define TPRx(_t_,_x_) ((void)(zDebug && (_t_) && \
// prx(WHERE " " #_x_, (unsigned long)_x_)))
//
//#define TPRd(_t_,_x_) ((void)(zDebug && (_t_) && \
// prd(WHERE " " #_x_, (unsigned long)_x_)))
//
//#define TPRc(_t_,_x_) ((void)(zDebug && (_t_) && \
// prc(WHERE " " #_x_, (char)_x_)))
//
//#define TPR(_t_,_x_) ((void)(zDebug && (_t_) && \
// pr(WHERE, #_x_)))
//
//#define TSPY(_t_) ((void)(zDebug && (_t_) && SPY))
//#define TSTOP(_t_) ((void)(zDebug && (_t_) && STOP))
//#define TEST(_t_) ((void)(zDebug && (_t_) && \
// pr(WHERE " " #_t_)))
//#define T(_t_,_x_) ((void)(zDebug && (_t_) && \
// pr(WHERE " " #_x_)))
//
//
//#define DPRx(_x_) ((void)(zDebug && \
// prx(WHERE " " #_x_, (unsigned long)_x_)))
//
//#define DPRd(_x_) ((void)(zDebug && \
// prd(WHERE " " #_x_, (unsigned long)_x_)))
//
//#define DPRc(_x_) ((void)(zDebug && \
// prc(WHERE " " #_x_, (char)_x_)))
//
//#define DPRs(_x_) ((void)(zDebug && \
// prs(WHERE " " #_x_, (char *)_x_)))
//
//#define DPR(_x_) ((void)(zDebug && \
// pr(WHERE " " #_x_)))
//
//#define DHERE ((void)(zDebug && HERE))
//#define DSTOP ((void)(zDebug && STOP))
//
//#define TR(_t_, _x_) ((void)((zTrace & (_t_)) && \
// tr(WHERE " " #_x_)))
//
//#define TR1(_t_, _x_) ((void)((zTrace & (_t_)) && \
// (zTraceLevel >= 1) && \
// tr(WHERE " " #_x_)))
//
//#define TR2(_t_, _x_) ((void)((zTrace & (_t_)) && \
// (zTraceLevel >= 2) && \
// tr(WHERE " " #_x_)))
//
//#define TR3(_t_, _x_) ((void)((zTrace & (_t_)) && \
// (zTraceLevel >= 3) && \
// tr(WHERE " " #_x_)))
//
//#define TR4(_t_, _x_) ((void)((zTrace & (_t_)) && \
// (zTraceLevel >= 4) && \
// tr(WHERE " " #_x_)))
//
//#define TR5(_t_, _x_) ((void)((zTrace & (_t_)) && \
// (zTraceLevel >= 5) && \
// tr(WHERE " " #_x_)))
//
//#define CNT(id) debugCount(WHERE " " # id)
//
//#define SETWHERE() (zDebugWhere = WHERE)
//#define CLRWHERE() (zDebugWhere = NULL)
//
/*#define IN(_x_) (printDepth("in" #_x_), ++Depth)*/
/*#define OUT(_x_) (--Depth, printDepth("out" #_x_))*/
//
//
//#define ZIN(_msg, _zid, _logical, _physical) \
// (ztrace("IN " #_msg, (_zid), (_logical), (_physical)))
//
//#define ZOUT(_msg, _zid, _logical, _physical) \
// (ztrace("OUT " #_msg, (_zid), (_logical), (_physical)))
#endif
#else /* NSS_DEBUG */
/*=========================================================================
* These are versions of the debug macros that do nothing
*=========================================================================*/
#define NOT_IMPLEMENTED() ((void)0)
#define CHOKE_DEBUG_LOG() ((void)0)
#define INITDBGIO() ((void)0)
#define DBGLOCK() ((void)0)
#define DBGUNLOCK() ((void)0)
//#define STUBBED() ((void)0)
#if 0
//#define DEBUG(_x_) ((void) 0)
//
//#define PRx(_x_) ((void) 0)
//#define PRd(_x_) ((void) 0)
//#define PRc(_x_) ((void) 0)
//#define PRs(_x_) ((void) 0)
//#define PR(_s_) ((void) 0)
//#define HERE ((void) 0)
//#define STOP ((void) 0)
//
//#define TPRx(_x_) ((void) 0)
//#define TPRd(_x_) ((void) 0)
//#define TPRc(_x_) ((void) 0)
//#define TPR(_s_) ((void) 0)
//#define TSPY ((void) 0)
//#define TSTOP ((void) 0)
//#define T ((void) 0)
//
//#define DPRx(_x_) ((void) 0)
//#define DPRd(_x_) ((void) 0)
//#define DPRc(_x_) ((void) 0)
//#define DPR(_s_) ((void) 0)
//#define DSPY ((void) 0)
//#define DSTOP ((void) 0)
//#define TR(_t_, _x_) ((void) 0)
//#define TR1(_t_, _x_) ((void) 0)
//#define TR2(_t_, _x_) ((void) 0)
//#define TR3(_t_, _x_) ((void) 0)
//#define TR4(_t_, _x_) ((void) 0)
//#define TR5(_t_, _x_) ((void) 0)
//
//#define CNT(id) ((void) 0)
//
//#define SETWHERE() ((void) 0)
//#define CLRWHERE() ((void) 0)
//
//#define IN(_x_) ((void) 0)
//#define OUT(_x_) ((void) 0)
//
//#define ZIN(_msg, _zid, _logical, _physical) ((void) 0)
//#define ZOUT(_msg, _zid, _logical, _physical) ((void) 0)
#endif
#define DEBUG_PRINTF(_mask,_flag,_ioprms) ((void) 0)
//#define TRACE_PRINTF(_dmask,_tmask,_ioprms) ((void) 0)
//#define TRACE_NOINDENT_PRINTF(_dmask,_tmask,_ioprms) ((void) 0)
#define DEBUG_HEX_DUMP(_dmask, _color, _mode, _memory, _len) ((void) 0)
#define ENTER(_t,_s) ((void) 0)
#define INDENT() ((void) 0)
#define EXIT_VOID() ((void) 0)
#define RTN_VOID() return
#define RTN_SNINT(_i) return (_i)
#define RTN_NINT(_i) return (_i)
#define RTN_BLOCK(_i) return (_i)
#define RTN_BYTE(_i) return (_i)
#define RTN_BOOL(_i) return (_i)
#define RTN_STATUS(_i) return (_i)
#define RTN_PTR(_p) return (_p)
#define RTN_LONG(_p) return (_p)
#define RTN_ZID(_q) return (_q)
#define RTN_MPKUNLOCK_VOID() MPKNSS_UNLOCK(); return
#define RTN_MPKUNLOCK_SNINT(_i) MPKNSS_UNLOCK(); return (_i)
#define RTN_MPKUNLOCK_NINT(_i) MPKNSS_UNLOCK(); return (_i)
#define RTN_MPKUNLOCK_BLOCK(_i) MPKNSS_UNLOCK(); return (_i)
#define RTN_MPKUNLOCK_BYTE(_i) MPKNSS_UNLOCK(); return (_i)
#define RTN_MPKUNLOCK_BOOL(_i) MPKNSS_UNLOCK(); return (_i)
#define RTN_MPKUNLOCK_STATUS(_i) MPKNSS_UNLOCK(); return (_i)
#define RTN_MPKUNLOCK_PTR(_p) MPKNSS_UNLOCK(); return (_p)
#define RTN_MPKUNLOCK_LONG(_p) MPKNSS_UNLOCK(); return (_p)
#define RTN_MPKUNLOCK_ZID(_q) MPKNSS_UNLOCK(); return (_q)
#endif /* NSS_DEBUG */
#ifdef __cplusplus
}
#endif
#endif /* _PSSDEBUG_H_ */