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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
27 #include <streamelement.h>
34 Class that represents a thread on the target. It is based on CStreamElementBase, so
35 it can be streamed between client and server.
36 It is used by the Core Dump server, its clients and the plugins.
38 class CThreadInfo : public CStreamElementBase
43 IMPORT_C static CThreadInfo* NewL( const TUint64 & aId,
45 const TUint64 & aProcessId,
46 const TUint & aPriority,
47 const TLinAddr & aSvcStackPtr,
48 const TLinAddr & aSvcStackAddr,
49 const TUint & aSvcStackSize,
50 const TLinAddr & aUsrStackAddr,
51 const TUint & aUsrStackSize );
53 IMPORT_C static CThreadInfo* NewL( const TDesC8 & aStreamData );
55 IMPORT_C ~CThreadInfo();
59 // Methods specific to CThreadInfo
61 IMPORT_C const TUint64 & Id( ) const;
63 IMPORT_C void NameL( const TDesC & aName );
64 IMPORT_C const TDesC & Name() const;
66 IMPORT_C const TUint64 & ProcessId( ) const;
68 IMPORT_C TUint Priority( ) const;
69 IMPORT_C TUint SvcStackPtr( ) const;
70 IMPORT_C TUint SvcStackAddr( ) const;
71 IMPORT_C TUint SvcStackSize( ) const;
72 IMPORT_C TUint UsrStackAddr( ) const;
73 IMPORT_C TUint UsrStackSize( ) const;
75 IMPORT_C TBool Observed( ) const;
76 IMPORT_C void Observed( TBool aFlag );
79 // Methods required by streaming interface
81 IMPORT_C TInt static MaxSize();
83 IMPORT_C TInt Size() const;
85 IMPORT_C void InternalizeL( RReadStream & aStream );
87 IMPORT_C void ExternalizeL( RWriteStream & aStream, CBufFlat* buf );
92 CThreadInfo( const TUint64 & aId,
93 const TUint64 & aProcessId,
94 const TUint & aPriority,
95 const TLinAddr & aSvcStackPtr,
96 const TLinAddr & aSvcStackAddr,
97 const TUint & aSvcStackSize,
98 const TLinAddr & aUsrStackAddr,
99 const TUint & aUsrStackSize );
103 void ConstructL( const TDesC & aName );
107 /** Symbian kernel thread id */
110 /** Symbian kernel thread name */
113 /** Symbian kernel process id of owning process */
116 /** Symbian kernel thread priority TThreadPriority */
119 /** Thread supervisor stack pointer */
120 TLinAddr iSvcStackPtr;
122 /** Thread supervisor mode stack base address */
123 TLinAddr iSvcStackAddr;
125 /** Thread supervisor mode stack size in bytes */
128 /** Thread user mode stack base address */
129 TLinAddr iUsrStackAddr;
131 /** Thread user mode stack base size in bytes */
134 /** Set to ETrue if the thread is being explicitly observed for crashes
135 by the Core Dump Server. If only the owning process is being observed,
136 this should be EFalse. */
139 /** Externalized size */
142 // These are not internalised/externalised since they are spare
154 List of CThreadInfo object pointers.
158 typedef RPointerArray<CThreadInfo> RThreadPointerList;
161 #endif // THREADDATA_H