|
1 /* |
|
2 * Copyright (c) 2009 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 using System; |
|
18 using System.Text; |
|
19 using System.Collections.Generic; |
|
20 using SymbianUtils; |
|
21 using SymbianStructuresLib.CodeSegments; |
|
22 using SymbianDebugLib.Engine; |
|
23 using CrashItemLib.Crash; |
|
24 using CrashItemLib.Crash.Messages; |
|
25 using CrashItemLib.Engine; |
|
26 |
|
27 namespace CrashItemLib.Crash.Base |
|
28 { |
|
29 internal sealed class CIElementFinalizationParameters : DisposableObject |
|
30 { |
|
31 #region Constructors |
|
32 public CIElementFinalizationParameters( CIEngine aEngine ) |
|
33 { |
|
34 iEngine = aEngine; |
|
35 |
|
36 // We create a (default) debug engine view that is not associated with any particular process-relative |
|
37 // view of the symbols etc. In other words, it can resolve XIP-only content. |
|
38 iDebugEngineView = aEngine.DebugEngine.CreateView( "CIEngine Global Debug Engine View" ); |
|
39 } |
|
40 |
|
41 public CIElementFinalizationParameters( CIEngine aEngine, string aName, CodeSegDefinitionCollection aCodeSegments ) |
|
42 { |
|
43 iEngine = aEngine; |
|
44 iDebugEngineView = aEngine.DebugEngine.CreateView( aName, aCodeSegments ); |
|
45 } |
|
46 #endregion |
|
47 |
|
48 #region API |
|
49 #endregion |
|
50 |
|
51 #region Properties |
|
52 public CIEngine Engine |
|
53 { |
|
54 get { return iEngine; } |
|
55 } |
|
56 |
|
57 public DbgEngine DebugEngine |
|
58 { |
|
59 get { return iEngine.DebugEngine; } |
|
60 } |
|
61 |
|
62 public DbgEngineView DebugEngineView |
|
63 { |
|
64 get { return iDebugEngineView; } |
|
65 } |
|
66 #endregion |
|
67 |
|
68 #region From DisposableObject |
|
69 protected override void CleanupManagedResources() |
|
70 { |
|
71 try |
|
72 { |
|
73 base.CleanupManagedResources(); |
|
74 } |
|
75 finally |
|
76 { |
|
77 if ( iDebugEngineView != null ) |
|
78 { |
|
79 iDebugEngineView.Dispose(); |
|
80 iDebugEngineView = null; |
|
81 } |
|
82 } |
|
83 } |
|
84 #endregion |
|
85 |
|
86 #region Data members |
|
87 private readonly CIEngine iEngine; |
|
88 private DbgEngineView iDebugEngineView = null; |
|
89 #endregion |
|
90 } |
|
91 } |