|
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 SymbianStructuresLib.Debug.Symbols; |
|
22 using CrashDebuggerLib.Structures.KernelObjects; |
|
23 using SymbianStructuresLib.Arm.Registers; |
|
24 |
|
25 namespace CrashDebuggerLib.Structures.Register |
|
26 { |
|
27 public class RegisterEntryCPSR : RegisterEntry |
|
28 { |
|
29 #region Constructors |
|
30 internal RegisterEntryCPSR( RegisterCollection aParent, uint aValue ) |
|
31 : base( aParent, ArmRegister.GetTypeName( TArmRegisterType.EArmReg_CPSR ), aValue ) |
|
32 { |
|
33 } |
|
34 #endregion |
|
35 |
|
36 #region API |
|
37 public RegisterCollection.TType CurrentBank |
|
38 { |
|
39 get |
|
40 { |
|
41 RegisterCollection.TType type = RegisterCollection.TType.ETypeUser; |
|
42 // |
|
43 uint maskedCPSR = Value & KMaskValue; |
|
44 type = (RegisterCollection.TType) maskedCPSR; |
|
45 // |
|
46 return type; |
|
47 } |
|
48 } |
|
49 #endregion |
|
50 |
|
51 #region Properties |
|
52 #endregion |
|
53 |
|
54 #region Internal methods |
|
55 #endregion |
|
56 |
|
57 #region Internal constants |
|
58 private const uint KMaskValue = 0x1F; |
|
59 #endregion |
|
60 |
|
61 #region From System.Object |
|
62 public override string ToString() |
|
63 { |
|
64 StringBuilder ret = new StringBuilder(); |
|
65 ret.Append( base.ToString() ); |
|
66 return ret.ToString(); |
|
67 } |
|
68 #endregion |
|
69 |
|
70 #region Data members |
|
71 #endregion |
|
72 } |
|
73 } |