|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef DEBUGTRACEMACROS_H |
|
21 #define DEBUGTRACEMACROS_H |
|
22 |
|
23 #define RET_ERR_IF_ERR(err) if ( err != KErrNone) return err; |
|
24 |
|
25 #ifdef _DEBUG |
|
26 #include "e32debug.h" |
|
27 |
|
28 #define TRACE_PRN_FN_ENT RDebug::Printf("%s>ENTER", __PRETTY_FUNCTION__) |
|
29 #define TRACE_PRN_FN_EXT RDebug::Printf("%s>EXIT", __PRETTY_FUNCTION__) |
|
30 #define TRACE_PRN_IF_ERR(err) if (err != KErrNone) RDebug::Printf( "%s>BREAK[%d]", __PRETTY_FUNCTION__, err ) |
|
31 |
|
32 #define TRACE_PRN_0(str) RDebug::Print(str, this) |
|
33 #define TRACE_PRN_1(str, val1) RDebug::Print(str, this, val1) |
|
34 #define TRACE_PRN_2(str, val1, val2) RDebug::Print(str, this, val1, val2) |
|
35 |
|
36 #define TRACE_PRN_N(str) RDebug::Print(str) |
|
37 #define TRACE_PRN_N1(str, val1) RDebug::Print(str, val1) |
|
38 #define TRACE_PRN_N2(str, val1, val2) RDebug::Print(str, val1, val2) |
|
39 |
|
40 #else |
|
41 |
|
42 #define TRACE_PRN_FN_ENT |
|
43 #define TRACE_PRN_FN_EXT |
|
44 #define TRACE_PRN_IF_ERR(err) |
|
45 #define TRACE_PRN_0(str) |
|
46 #define TRACE_PRN_1(str, val1) |
|
47 #define TRACE_PRN_2(str, val1, val2) |
|
48 #define TRACE_PRN_N(str) |
|
49 #define TRACE_PRN_N1(str, val1) |
|
50 #define TRACE_PRN_N2(str, val1, val2) |
|
51 #endif //_DEBUG |
|
52 |
|
53 #endif // DEBUGTRACEMACROS_H |
|
54 |
|
55 // End of file |