trace.h 1.27 KB

/*************************************************************************
 *
 *  File: trace.h
 *
 *  Header file for tracing facility
 *
 *  $Header: /root/leakn64/depot/rf/lib/libbcppli/trace.h,v 1.1 2002/06/21 21:03:52 whs Exp $
 *
 */


#ifndef _TRACE_H_
#define _TRACE_H_

#ifdef DEBUG

extern unsigned long    Dflags;         /* Global debug flag */

                                        /* Debug flag settings */
#define DALL            0xFFFFFFFF      /* Turn on all debug types */
#define DERROR          0x00000001      /* Turn on error tracing */
#define DREAD           0x00000002      /* Turn on read tracing */
#define DWRITE          0x00000004      /* Turn on write tracing */
#define DSIGNAL         0x00000008      /* Turn on signal tracing */
#define DINST           0x00000010      /* Turn on instruction tracing */
#define DREGS           0x00000020      /* Turn on register tracing */
#define DLOG            0x00000040      /* Turn on log tracing */
#define DTRANS		0x00000080      /* Turn on IO R/W tracing */
#define DSTATUS		0x00000100      /* Turn on status tracing */
#define DCOMPARE	0x00000200      /* Turn on data compare tracing */

#define _TRACE(type, code)      { if (Dflags & (type)) code; }

#else
#define _TRACE(type, code)
#endif

#endif  /* _TRACE_H_ */