1/* 2 * FWDebugging.h 3 * SBP2TestApp 4 * 5 * Created by cpieper on Mon Nov 06 2000. 6 * Copyright (c) 2000 __CompanyName__. All rights reserved. 7 * 8 */ 9 10// the controls 11 12#define USEFIRELOG 0 13#define FWDIAGNOSTICS 0 14#define FWLOGGING 0 15#define LSILOGGING 0 16#define LSIALLOCLOGGING 0 17#define PANIC_ON_DOUBLE_APPEND 0 18 19/////////////////////////////////////////// 20 21#if USEFIRELOG 22 #if KERNEL 23 #include <IOKit/firewire/IOFireLog.h> 24 #endif 25#endif 26 27#if FWLOGGING 28#define FWLOG(x) printf x 29#else 30#define FWLOG(x) do {} while (0) 31#endif 32 33#if FWLOGGING 34 #if USEFIRELOG 35 #define FWKLOG(x) FireLog x 36 #else 37 #define FWKLOG(x) IOLog x 38 #endif 39#else 40#define FWKLOG(x) do {} while (0) 41#endif 42 43#if FWLOGGING 44#define FWKLOGASSERT(a) { if(!(a)) { IOLog( "File "__FILE__", line %d: assertion '%s' failed.\n", __LINE__, #a); } } 45#else 46#define FWKLOGASSERT(a) do {} while (0) 47#endif 48 49#if FWLOGGING 50#define FWLOGASSERT(a) { if(!(a)) { printf( "File "__FILE__", line %d: assertion '%s' failed.\n", __LINE__, #a); } } 51#else 52#define FWLOGASSERT(a) do {} while (0) 53#endif 54 55#if FWLOGGING 56#define FWPANICASSERT(a) { if(!(a)) { panic( "File "__FILE__", line %d: assertion '%s' failed.\n", __LINE__, #a); } } 57#else 58#define FWPANICASSERT(a) do {} while (0) 59#endif 60 61#if LSILOGGING 62#define FWLSILOG(x) FWKLOG(x) 63#else 64#define FWLSILOG(x) do {} while (0) 65#endif 66 67#if LSIALLOCLOGGING 68#define FWLSILOGALLOC(x) FWKLOG(x) 69#else 70#define FWLSILOGALLOC(x) do {} while (0) 71#endif