|
1 /* |
|
2 * Copyright (c) 2004-2008 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 using System; |
|
19 using System.Collections.Generic; |
|
20 using System.Text; |
|
21 using CrashDebuggerLib.Structures.KernelObjects; |
|
22 using CrashDebuggerLib.Structures.Common; |
|
23 using CrashDebuggerLib.Structures.Process; |
|
24 |
|
25 namespace CrashDebuggerLib.Structures.Chunk |
|
26 { |
|
27 public class DChunk : DObject |
|
28 { |
|
29 #region Enumerations |
|
30 [System.ComponentModel.TypeConverter( typeof( SymbianParserLib.TypeConverters.SymbianEnumConverter ) )] |
|
31 public enum TChunkType |
|
32 { |
|
33 EUnknown = -1, |
|
34 |
|
35 // these never change or move or anything |
|
36 EKernelData = 0, // Supervisor,Rw,Cacheable |
|
37 EKernelStack = 1, // Supervisor,Rw,Cacheable |
|
38 EKernelCode = 2, // Supervisor,Rw,Cacheable |
|
39 EDll = 3, // User,Ro,Cacheable |
|
40 EUserCode = 4, |
|
41 |
|
42 // This changes on a PDE basis when the file server runs |
|
43 ERamDrive = 5, // Supervisor,Rw,Cacheable |
|
44 |
|
45 // these change on PDE basis when run |
|
46 EUserData = 6, |
|
47 EDllData = 7, |
|
48 EUserSelfModCode = 8, |
|
49 |
|
50 ESharedKernelSingle = 9, // Must be same value as TChunkCreateInfo::ESharedKernelSingle |
|
51 ESharedKernelMultiple = 10, // Must be same value as TChunkCreateInfo::ESharedKernelMultiple |
|
52 |
|
53 ESharedIo = 11, |
|
54 ESharedKernelMirror = 12, |
|
55 } |
|
56 |
|
57 [Flags, System.ComponentModel.TypeConverter( typeof( SymbianParserLib.TypeConverters.SymbianEnumConverter ) )] |
|
58 public enum TChunkAttributes : uint |
|
59 { |
|
60 // Basic range |
|
61 //ENormal = 0x00000000, // Commented out because it conflicts with EAddressLocal |
|
62 EDoubleEnded = 0x00000001, |
|
63 EDisconnected = 0x00000002, |
|
64 EConstructed = 0x00000004, |
|
65 EMemoryNotOwned = 0x00000008, |
|
66 |
|
67 // From Multiple Memory Model |
|
68 EPrivate = 0x80000000, |
|
69 ECode = 0x40000000, |
|
70 EAddressAllocDown = 0x20000000, |
|
71 |
|
72 EAddressLocal = 0x00000000, |
|
73 EAddressShared = 0x01000000, |
|
74 EAddressUserGlobal = 0x02000000, |
|
75 EAddressKernel = 0x03000000, |
|
76 EAddressFixed = 0x04000000, |
|
77 |
|
78 EMapTypeMask = 0x00c00000, |
|
79 EMapTypeLocal = 0x00000000, |
|
80 EMapTypeGlobal = 0x00400000, |
|
81 EMapTypeShared = 0x00800000, |
|
82 } |
|
83 #endregion |
|
84 |
|
85 #region Constructors |
|
86 public DChunk( CrashDebuggerInfo aCrashDebugger ) |
|
87 : base( aCrashDebugger, TObjectType.EChunk ) |
|
88 { |
|
89 } |
|
90 #endregion |
|
91 |
|
92 #region API |
|
93 #endregion |
|
94 |
|
95 #region Properties |
|
96 public uint OwningProcessAddress |
|
97 { |
|
98 get { return iOwningProcessAddress; } |
|
99 set { iOwningProcessAddress = value; } |
|
100 } |
|
101 |
|
102 public DProcess OwningProcess |
|
103 { |
|
104 get { return CrashDebugger.ProcessByAddress( OwningProcessAddress ); } |
|
105 } |
|
106 |
|
107 public uint OSAsids |
|
108 { |
|
109 get { return iOsAsids; } |
|
110 set { iOsAsids = value; } |
|
111 } |
|
112 |
|
113 public uint Size |
|
114 { |
|
115 get { return iSize; } |
|
116 set { iSize = value; } |
|
117 } |
|
118 |
|
119 public uint MaxSize |
|
120 { |
|
121 get { return iMaxSize; } |
|
122 set { iMaxSize = value; } |
|
123 } |
|
124 |
|
125 public uint Base |
|
126 { |
|
127 get { return iBase; } |
|
128 set { iBase = value; } |
|
129 } |
|
130 |
|
131 public TChunkAttributes Attributes |
|
132 { |
|
133 get { return iAttributes; } |
|
134 set { iAttributes = value; } |
|
135 } |
|
136 |
|
137 public uint StartPos |
|
138 { |
|
139 get { return iStartPos; } |
|
140 set { iStartPos = value; } |
|
141 } |
|
142 |
|
143 public TChunkType ChunkType |
|
144 { |
|
145 get { return iChunkType; } |
|
146 set { iChunkType = value; } |
|
147 } |
|
148 |
|
149 public ChunkPermissions Permissions |
|
150 { |
|
151 get { return iPermissions; } |
|
152 } |
|
153 |
|
154 public uint PageTables |
|
155 { |
|
156 get { return iPageTables; } |
|
157 set { iPageTables = value; } |
|
158 } |
|
159 |
|
160 public uint PageBitMap |
|
161 { |
|
162 get { return iPageBitMap; } |
|
163 set { iPageBitMap = value; } |
|
164 } |
|
165 #endregion |
|
166 |
|
167 #region Internal methods |
|
168 #endregion |
|
169 |
|
170 #region Internal constants |
|
171 #endregion |
|
172 |
|
173 #region From System.Object |
|
174 public override string ToString() |
|
175 { |
|
176 return base.ToString(); |
|
177 } |
|
178 #endregion |
|
179 |
|
180 #region Data members |
|
181 private uint iOwningProcessAddress = 0; |
|
182 private uint iOsAsids = 0; |
|
183 private uint iSize = 0; |
|
184 private uint iMaxSize = 0; |
|
185 private uint iBase = 0; |
|
186 private TChunkAttributes iAttributes = TChunkAttributes.EAddressLocal; |
|
187 private uint iStartPos = 0; |
|
188 private TChunkType iChunkType = TChunkType.EUnknown; |
|
189 private ChunkPermissions iPermissions = new ChunkPermissions(); |
|
190 private uint iPageTables = 0; |
|
191 private uint iPageBitMap = 0; |
|
192 #endregion |
|
193 } |
|
194 } |