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