trace.h
2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef _TRACE_H_
#define _TRACE_H_
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/**************************************************************************
*
* Module: trace.h
*
* $Revision: 1.1.1.2 $
* $Date: 2002/10/29 08:06:34 $
* $Author: blythe $
* $Source: /root/leakn64/depot/rf/sw/bbplayer/include/trace.h,v $
*
* Description:
* This file contains debbuging and tracing macros
*
**************************************************************************/
/***************************************
*
* Macro definitions
*
*/
/* Debug macros */
#ifdef _TRACE
#undef _TRACE
#endif
#ifdef _DEBUG
#if defined( _EMULATOR ) || ( _INDY_TARGET )
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 DTHREAD 0x00000002 /* Turn on thread tracing */
#define DTIMER 0x00000004 /* Turn on timer tracing */
#define DMESSAGE 0x00000008 /* Turn on message tracing */
#define DMEMORY 0x00000010 /* Turn on memory tracing */
#define DREGION 0x00000020 /* Turn on region tracing */
#define _TRACE(type, code) { if (Dflags & (type)) \
{ printf("%s, %d: ", __FILE__, __LINE__); code; } }
#else
#define _TRACE(type, code)
#endif /* _EMULATOR | _INDY_TARGET */
#else
#define _TRACE(type, code)
#endif /* _DEBUG */
/***************************************
*
* Extern function prototypes
*
*/
#endif /* _TRACE_H_ */