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 Source Locations. | |
15 /// </summary> | |
16 public class SourceLocationLoader | |
17 : DictionaryLoader<SymbolDatabase.SourceLocation> { | |
18 protected override TreeNode GetTreeNode(ulong key, | |
19 SymbolDatabase.SourceLocation | |
20 location) { | |
21 var locationNode = new TreeNode(); | |
22 var keyString = GetString(key); | |
23 locationNode.Name = keyString; | |
24 locationNode.Text = @"Location: " + keyString; | |
25 var valuesString = string.Format( | |
26 "Values: Address: {0} SourceFile: {1} Line: {2} Column: {3} Length: {4
}", | |
27 location.StartAddress, | |
28 location.SourceFileKey, | |
29 location.Line, | |
30 location.Column, | |
31 location.Length); | |
32 locationNode.Nodes.Add("Values", valuesString); | |
33 return locationNode; | |
34 } | |
35 } | |
36 } | |
OLD | NEW |