|
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.Register; |
|
23 using CrashDebuggerLib.Structures.Common; |
|
24 using SymbianStructuresLib.Arm.Registers; |
|
25 |
|
26 namespace CrashDebuggerLib.Structures.Cpu |
|
27 { |
|
28 public class CpuInfo : RegisterSet |
|
29 { |
|
30 #region Constructors |
|
31 public CpuInfo( CrashDebuggerInfo aCrashDebugger ) |
|
32 : base( aCrashDebugger ) |
|
33 { |
|
34 } |
|
35 #endregion |
|
36 |
|
37 #region API |
|
38 public RegisterCollection GetRegisters() |
|
39 { |
|
40 RegisterCollection.TType bankType = CPSRBankType; |
|
41 RegisterCollection bank = this[ bankType ]; |
|
42 // |
|
43 RegisterCollection ret = new RegisterCollection( CrashDebugger, bankType ); |
|
44 foreach ( RegisterEntry entry in bank ) |
|
45 { |
|
46 ret.Add( entry.OriginalName, entry.Value ); |
|
47 } |
|
48 |
|
49 return ret; |
|
50 } |
|
51 #endregion |
|
52 |
|
53 #region Properties |
|
54 #endregion |
|
55 |
|
56 #region Internal methods |
|
57 private void TryToUpdateRegister( ArmRegister aObjectToUpdate, RegisterCollection aSource ) |
|
58 { |
|
59 RegisterEntry entry = aSource[ aObjectToUpdate.RegType ]; |
|
60 if ( entry != null ) |
|
61 { |
|
62 aObjectToUpdate.Value = entry.Value; |
|
63 } |
|
64 } |
|
65 #endregion |
|
66 |
|
67 #region Internal constants |
|
68 #endregion |
|
69 |
|
70 #region Data members |
|
71 #endregion |
|
72 } |
|
73 } |