|
1 // Copyright (c) 2007-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 // Purpose: Kernel-side tracking of event information |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef T_DRIVER_EVENT_INFO_H |
|
19 #define T_DRIVER_EVENT_INFO_H |
|
20 |
|
21 #include <rm_debug_api.h> |
|
22 #include <kernel/kernel.h> |
|
23 |
|
24 /** |
|
25 @file |
|
26 @internalComponent |
|
27 */ |
|
28 |
|
29 class TDriverEventInfo |
|
30 { |
|
31 public: |
|
32 TDriverEventInfo(); |
|
33 void Reset(); |
|
34 TInt WriteEventToClientThread(TClientDataRequest<Debug::TEventInfo>* aAsyncGetValueRequest, DThread* aClientThread) const; |
|
35 TBool FreezeOnSuspend() const; |
|
36 |
|
37 private: |
|
38 TInt PopulateCommonEventInfo(Debug::TEventInfo& aEventInfo) const; |
|
39 TInt PopulateEventSpecificInfo(Debug::TEventInfo& aEventInfo) const; |
|
40 TInt PopulateThreadBreakPointInfo(Debug::TEventInfo& aEventInfo) const; |
|
41 TInt PopulateThreadHwExceptionInfo(Debug::TEventInfo& aEventInfo) const; |
|
42 TInt PopulateThreadSwExceptionInfo(Debug::TEventInfo& aEventInfo) const; |
|
43 TInt PopulateThreadKillInfo(Debug::TEventInfo& aEventInfo) const; |
|
44 TInt PopulateLibraryLoadedInfo(Debug::TEventInfo& aEventInfo) const; |
|
45 TInt PopulateLibraryUnloadedInfo(Debug::TEventInfo& aEventInfo) const; |
|
46 TInt PopulateRmdArmExcInfo(Debug::TEventInfo& aEventInfo) const; |
|
47 TInt PopulateUserTraceInfo(Debug::TEventInfo& aEventInfo) const; |
|
48 TInt PopulateStartThreadInfo(Debug::TEventInfo& aEventInfo) const; |
|
49 TInt PopulateAddProcessInfo(Debug::TEventInfo& aEventInfo) const; |
|
50 TInt PopulateRemoveProcessInfo(Debug::TEventInfo& aEventInfo) const; |
|
51 TBool TookException() const; |
|
52 |
|
53 public: |
|
54 Debug::TEventType iEventType; |
|
55 TUint64 iProcessId; |
|
56 TUint64 iThreadId; |
|
57 TUint64 iCreatorThreadId; |
|
58 TUint32 iCurrentPC; |
|
59 TInt iExceptionNumber; |
|
60 TBuf8<KMaxName> iFileName; |
|
61 TBuf8<Debug::KPanicCategoryMaxName> iPanicCategory; |
|
62 TUint32 iCodeAddress; |
|
63 TUint32 iDataAddress; |
|
64 TUint8 iExitType; |
|
65 TUint8 iThreadIdValid; |
|
66 TUint8 iProcessIdValid; |
|
67 TUidType iUids; |
|
68 TUint8 iUidsValid; |
|
69 Debug::TKernelEventAction iActionTaken; |
|
70 TUint32 iThreadFlags; |
|
71 |
|
72 //The objects that these pointers point to are not |
|
73 //owned by the Debug::TEventInfo class so no cleanup is required |
|
74 TAny* iArg1; // a1 |
|
75 TAny* iArg2; // a2 |
|
76 |
|
77 union |
|
78 { |
|
79 Debug::TRmdArmExcInfo iRmdArmExcInfo; |
|
80 //To store Trace info |
|
81 TUint8 iUserTraceText[Debug::TUserTraceSize]; |
|
82 }; |
|
83 |
|
84 //status of trace message |
|
85 Debug::TUserTraceMessageContext iMessageStatus; |
|
86 |
|
87 }; |
|
88 |
|
89 |
|
90 #endif //T_DRIVER_EVENT_INFO_H |