os/kernelhwsrv/kernel/eka/debug/crashMonitor/inc/scmtrace.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // scmdatatypes.h
    15 // 
    16 // WARNING: This file contains some APIs which are internal and are subject
    17 //          to change without notice. Such APIs should therefore not be used
    18 //          outside the Kernel and Hardware Services package.
    19 //
    20 
    21 
    22 #ifndef __SCMTRACE_H_INCLUDED__
    23 #define __SCMTRACE_H_INCLUDED__
    24 
    25 #ifdef _DEBUG	
    26 	#define __SCMFUNCTIONLOGGING __PRETTY_FUNCTION__ 
    27 #else
    28 	#define __SCMFUNCTIONLOGGING ""
    29 #endif
    30 
    31 // logger macro
    32 #ifdef __KERNEL_MODE__
    33 
    34 #include <kernel/kernel.h>
    35 #include <nk_trace.h>
    36 
    37 #define LOG_CONTEXT //__KTRACE_OPT(KALWAYS, Kern::Printf("Context --> <%s>", __SCMFUNCTIONLOGGING));
    38 #define CLTRACE(s) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s));
    39 #define CLTRACE1(s, p1) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1));
    40 #define CLTRACE2(s, p1, p2)  __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2));
    41 #define CLTRACE3(s, p1, p2, p3) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2, p3));
    42 #define CLTRACE4(s, p1, p2, p3, p4) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2, p3, p4));
    43 #define CLTRACE5(s, p1, p2, p3, p4, p5) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2, p3, p4, p5));
    44 
    45 #else
    46 
    47 #include <e32debug.h>
    48 
    49 #define LOG_CONTEXT RDebug::Printf("Context --> <%s>", __SCMFUNCTIONLOGGING);
    50 #define CLTRACE(s)  RDebug::Printf(s) ;
    51 #define CLTRACE1(s, p1) RDebug::Printf(s, p1) ;
    52 #define CLTRACE2(s, p1, p2) RDebug::Printf(s, p1, p2) ;
    53 #define CLTRACE3(s, p1, p2, p3) RDebug::Printf(s, p1, p2, p3);
    54 #define CLTRACE4(s, p1, p2, p3, p4) RDebug::Printf(s, p1, p2, p3, p4);
    55 #define CLTRACE5(s, p1, p2, p3, p4, p5) RDebug::Printf(s, p1, p2, p3, p4, p5);
    56 
    57 
    58 #endif
    59 
    60 
    61 #endif /*__SCMTRACE_H_INCLUDED__*/