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 |
// some utility classes for writing data to flash buffer
|
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 |
@file
|
sl@0
|
23 |
@internalTechnology
|
sl@0
|
24 |
*/
|
sl@0
|
25 |
|
sl@0
|
26 |
#ifndef __SCMCONFIGITEM_H_INCLUDED__
|
sl@0
|
27 |
#define __SCMCONFIGITEM_H_INCLUDED__
|
sl@0
|
28 |
|
sl@0
|
29 |
|
sl@0
|
30 |
#include <e32def.h>
|
sl@0
|
31 |
#ifndef __KERNEL_MODE__
|
sl@0
|
32 |
#include <e32std.h>
|
sl@0
|
33 |
#endif // ! __KERNEL_MODE__
|
sl@0
|
34 |
|
sl@0
|
35 |
#include <scmbytestreamutil.h>
|
sl@0
|
36 |
|
sl@0
|
37 |
|
sl@0
|
38 |
namespace Debug
|
sl@0
|
39 |
{
|
sl@0
|
40 |
/**
|
sl@0
|
41 |
* This object represents a data type to dump
|
sl@0
|
42 |
*/
|
sl@0
|
43 |
class TConfigItem : public MByteStreamSerializable
|
sl@0
|
44 |
{
|
sl@0
|
45 |
public:
|
sl@0
|
46 |
enum TSCMDataType
|
sl@0
|
47 |
{
|
sl@0
|
48 |
EExceptionStacks, /**< Dumps exception stacks */
|
sl@0
|
49 |
EVariantSpecificData, /**< Dumps Variant Specific data */
|
sl@0
|
50 |
ERomInfo, /**< Dumps ROM Build Info */
|
sl@0
|
51 |
ELocks, /**< Dumps Kernel Lock Info */
|
sl@0
|
52 |
EKernelHeap, /**< Dumps the Kernel Heap */
|
sl@0
|
53 |
ETraceData, /**< Dumps any trace data we find */
|
sl@0
|
54 |
EProcessCodeSegs, /**< Dumps System wide Code Segments for each Process */
|
sl@0
|
55 |
EThreadsUsrStack, /**< Dumps System wide User Stacks for each thread */
|
sl@0
|
56 |
EThreadsSvrStack, /**< Dumps System wide Supervisor Stacks for each thread */
|
sl@0
|
57 |
EThreadsUsrRegisters, /**< Dumps User Registers available for every thread in the System */
|
sl@0
|
58 |
EThreadsSvrRegisters, /**< Dumps Supervisor Registers available for every thread in the System */
|
sl@0
|
59 |
EProcessMetaData, /**< Dumps the Process List */
|
sl@0
|
60 |
EThreadsMetaData, /**< Dumps the Thread List */
|
sl@0
|
61 |
ECrashedProcessCodeSegs, /**< Dumps the Code Segments for the process that has crashed */
|
sl@0
|
62 |
ECrashedProcessUsrStacks, /**< Dumps the User stacks for each thread in the process that has crashed */
|
sl@0
|
63 |
ECrashedProcessSvrStacks, /**< Dumps the Supervisor stacks for each thread in the process that has crashed */
|
sl@0
|
64 |
ECrashedProcessMetaData, /**< Dumps Info about the process that has crashed */
|
sl@0
|
65 |
ECrashedThreadMetaData, /**< Dumps Info about the Thread that has crashed */
|
sl@0
|
66 |
ELast /**< End Marker */
|
sl@0
|
67 |
};
|
sl@0
|
68 |
|
sl@0
|
69 |
TConfigItem();
|
sl@0
|
70 |
TConfigItem(TSCMDataType aDataType, TUint8 aPriority, TInt32 aSizeToDump);
|
sl@0
|
71 |
|
sl@0
|
72 |
TSCMDataType GetDataType() const;
|
sl@0
|
73 |
TInt GetPriority() const;
|
sl@0
|
74 |
TInt GetSizeToDump() const;
|
sl@0
|
75 |
|
sl@0
|
76 |
// from MByteStreamSerializable
|
sl@0
|
77 |
virtual TInt Serialize(TByteStreamWriter& aWriter);
|
sl@0
|
78 |
virtual TInt Deserialize(TByteStreamReader& aReader);
|
sl@0
|
79 |
virtual TInt GetSize() const;
|
sl@0
|
80 |
|
sl@0
|
81 |
void SetSpaceRequired(TUint aSpaceReq);
|
sl@0
|
82 |
TUint GetSpaceRequired();
|
sl@0
|
83 |
|
sl@0
|
84 |
void Print() const;
|
sl@0
|
85 |
TBool operator == (const TConfigItem& aOther) const;
|
sl@0
|
86 |
TConfigItem* Next() const;
|
sl@0
|
87 |
|
sl@0
|
88 |
#ifndef __KERNEL_MODE__
|
sl@0
|
89 |
static const TDesC& GetSCMConfigOptionText(TConfigItem::TSCMDataType aType);
|
sl@0
|
90 |
#endif // ! __KERNEL_MODE__
|
sl@0
|
91 |
|
sl@0
|
92 |
private:
|
sl@0
|
93 |
TSCMDataType iDataType; /** The type this data represents */
|
sl@0
|
94 |
TUint iSizeToDump; /** the size of the data to dump */
|
sl@0
|
95 |
TUint iSpaceRequiredToDump; /** If known, this will contain the size of the data we need to dump */
|
sl@0
|
96 |
TUint8 iPriority; /** Priority of this data (0 is not required) */
|
sl@0
|
97 |
TConfigItem* iNext; /** Next config item in list */
|
sl@0
|
98 |
|
sl@0
|
99 |
friend class SCMConfiguration;
|
sl@0
|
100 |
|
sl@0
|
101 |
};
|
sl@0
|
102 |
}
|
sl@0
|
103 |
|
sl@0
|
104 |
|
sl@0
|
105 |
#endif // __SCMCONFIGITEM_H_INCLUDED__
|