OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #region | |
6 | |
7 using System.Windows.Forms; | |
8 using Google.NaClVsx.DebugSupport.DWARF; | |
9 | |
10 #endregion | |
11 | |
12 namespace SymbolDBViewer { | |
13 /// <summary> | |
14 /// Specializes the DictionaryLoader for loading the Scope Transitions. | |
15 /// </summary> | |
16 public class ScopeTransitionLoader | |
17 : DIECapableLoader<SymbolDatabase.ScopeTransition> { | |
18 protected override TreeNode GetTreeNode(ulong key, | |
19 SymbolDatabase.ScopeTransition | |
20 scopeTransition) { | |
21 var scopeTransitionNode = new TreeNode(); | |
22 var keyString = GetString(key); | |
23 scopeTransitionNode.Name = keyString; | |
24 scopeTransitionNode.Text = @"Scope Transition: " + keyString; | |
25 var valuesString = string.Format( | |
26 "Values: Address: {0}", | |
27 scopeTransition.Address); | |
28 scopeTransitionNode.Nodes.Add("Values", valuesString); | |
29 var dieNode = new TreeNode("DIE"); | |
30 if (scopeTransition.Entry != null) { | |
31 var dieValueNode = GetDIEValuesNode(scopeTransition.Entry); | |
32 var dieAttributesNode = | |
33 GetDIEAttributesNode(scopeTransition.Entry.Attributes); | |
34 dieNode.Nodes.Add(dieValueNode); | |
35 dieNode.Nodes.Add(dieAttributesNode); | |
36 } | |
37 scopeTransitionNode.Nodes.Add(dieNode); | |
38 return scopeTransitionNode; | |
39 } | |
40 } | |
41 } | |
OLD | NEW |