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 CallFrames. | |
15 /// </summary> | |
16 public class CallFrameLoader : DictionaryLoader<SymbolDatabase.CallFrame> { | |
17 protected override TreeNode GetTreeNode(ulong key, | |
18 SymbolDatabase.CallFrame callFrame)
{ | |
19 var callFrameNode = new TreeNode(); | |
20 var keyString = GetString(key); | |
21 callFrameNode.Name = keyString; | |
22 callFrameNode.Text = @"Call Frame" + keyString; | |
23 var valuesString = string.Format( | |
24 "Values: Address: {0}", | |
25 callFrame.Address); | |
26 callFrameNode.Nodes.Add("Values", valuesString); | |
27 foreach (var rule in callFrame.Rules) { | |
28 var ruleString = string.Format( | |
29 "Rule: Address: {0} Base Register: {1} Expression: {2} Offset: {3} R
egisterId: {4} RuleType: {5}", | |
30 rule.Address, | |
31 rule.BaseRegister, | |
32 rule.Expression, | |
33 rule.Offset, | |
34 rule.RegisterId, | |
35 rule.RuleType); | |
36 callFrameNode.Nodes.Add(ruleString); | |
37 } | |
38 return callFrameNode; | |
39 } | |
40 } | |
41 } | |
OLD | NEW |