kernel/eka/debug/securityServer/inc/rm_debug_logging.h
branchRCL_3
changeset 87 2f92ad2dc5db
parent 0 a41df078684a
child 258 880ff05ad710
equal deleted inserted replaced
81:e7d2d738d3c2 87:2f92ad2dc5db
    32   #ifdef __KERNEL_MODE__
    32   #ifdef __KERNEL_MODE__
    33 
    33 
    34     #include <kernel/kernel.h>
    34     #include <kernel/kernel.h>
    35     #include <nkern/nk_trace.h>
    35     #include <nkern/nk_trace.h>
    36 
    36 
    37     #define LOG_MSG( a )            __KTRACE_OPT(KDEBUGGER, Kern::Printf( a ))
    37     #define LOG_MSG(args...)			__KTRACE_OPT(KDEBUGGER, Kern::Printf(args))
    38     #define LOG_MSG2( a, b )        __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b ))
    38 	#define LOG_ENTRY()					__KTRACE_OPT(KDEBUGGER, Kern::Printf("+%s", __PRETTY_FUNCTION__))
    39     #define LOG_MSG3( a, b, c )     __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c ))
    39 	#define LOG_EXIT()					__KTRACE_OPT(KDEBUGGER, Kern::Printf("-%s", __PRETTY_FUNCTION__))
    40     #define LOG_MSG4( a, b, c, d )  __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c, d ))
    40 	#define LOG_ARGS(fmt, args...)		__KTRACE_OPT(KDEBUGGER, Kern::Printf("+%s " fmt, __PRETTY_FUNCTION__, args))
    41     #define LOG_MSG5( a, b, c, d, e )  __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c, d, e ))
    41 	#define LOG_RETURN(x)				__KTRACE_OPT(KDEBUGGER, Kern::Printf("Returning %d from [%s]", x, __PRETTY_FUNCTION__)
       
    42 
       
    43 	// These kept for compatability
       
    44     #define LOG_MSG2( a, b )			__KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b ))
       
    45     #define LOG_MSG3( a, b, c )			__KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c ))
       
    46     #define LOG_MSG4( a, b, c, d )		__KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c, d ))
       
    47     #define LOG_MSG5( a, b, c, d, e )	__KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c, d, e ))
    42   #else
    48   #else
    43 
    49 
    44     #include <e32debug.h>
    50     #include <e32debug.h>
    45 
    51 
    46     #define LOG_MSG( a )              RDebug::Printf( a )
    52     #define LOG_MSG(args...)			RDebug::Printf(args)
    47     #define LOG_MSG2( a, b )          RDebug::Printf( a, b )
    53 	#define LOG_DES(args...)			RDebug::Print(args) // For wide descriptors
    48     #define LOG_MSG3( a, b, c )       RDebug::Printf( a, b, c )
    54 	#define LOG_ENTRY()					RDebug::Printf("+%s", __PRETTY_FUNCTION__)
    49     #define LOG_MSG4( a, b, c, d )    RDebug::Printf( a, b, c, d )
    55 	#define LOG_EXIT()					RDebug::Printf("-%s", __PRETTY_FUNCTION__)
    50     #define LOG_MSG5( a, b, c, d, e )    RDebug::Printf( a, b, c, d, e )
    56 	#define LOG_ARGS(fmt, args...)		RDebug::Printf("+%s " fmt, __PRETTY_FUNCTION__, args)
       
    57 	#define LOG_RETURN(x)				RDebug::Printf("Returning %d from [%s]", x, __PRETTY_FUNCTION__)
       
    58 
       
    59     #define LOG_MSG2( a, b )			RDebug::Printf( a, b )
       
    60     #define LOG_MSG3( a, b, c )			RDebug::Printf( a, b, c )
       
    61     #define LOG_MSG4( a, b, c, d )		RDebug::Printf( a, b, c, d )
       
    62     #define LOG_MSG5( a, b, c, d, e )	RDebug::Printf( a, b, c, d, e )
    51 
    63 
    52   #endif
    64   #endif
    53 
    65 
    54 #else
    66 #else
    55 
    67 
    56   #define LOG_MSG( a )
    68 	#define LOG_MSG(args...)
    57   #define LOG_MSG2( a, b )
    69 	#define LOG_DES(args...)
    58   #define LOG_MSG3( a, b, c )
    70 	#define LOG_ENTRY()
    59   #define LOG_MSG4( a, b, c, d )
    71 	#define LOG_EXIT()
    60   #define LOG_MSG5( a, b, c, d, e )
    72 	#define LOG_ARGS(fmt, args...)
       
    73 	#define LOG_RETURN(x)
       
    74 
       
    75 	#define LOG_MSG2( a, b )
       
    76 	#define LOG_MSG3( a, b, c )
       
    77 	#define LOG_MSG4( a, b, c, d )
       
    78 	#define LOG_MSG5( a, b, c, d, e )
    61 
    79 
    62 #endif
    80 #endif
    63 
    81 
    64 #endif //RM_DEBUG_LOGGING_H
    82 #endif //RM_DEBUG_LOGGING_H
    65 
    83