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.Collections.Generic; | |
8 using System.Windows.Forms; | |
9 using Google.NaClVsx.DebugSupport.DWARF; | |
10 | |
11 #endregion | |
12 | |
13 namespace SymbolDBViewer { | |
14 /// <summary> | |
15 /// Specializes the DictionaryLoader for loading the Location Lists. | |
16 /// </summary> | |
17 public class LocListLoader | |
18 : DictionaryLoader<List<SymbolDatabase.LocListEntry>> { | |
19 protected override TreeNode GetTreeNode(ulong key, | |
20 List<SymbolDatabase.LocListEntry> | |
21 locList) { | |
22 var locListNode = new TreeNode(); | |
23 var keyString = GetString(key); | |
24 locListNode.Name = keyString; | |
25 locListNode.Text = @"LocList: " + keyString; | |
26 | |
27 foreach (var loc in locList) { | |
28 var locString = string.Format( | |
29 "Rule: Start Address: {0} End Address: {1} Data: {2}", | |
30 loc.StartAddress, | |
31 loc.EndAddress, | |
32 loc.Data); | |
33 locListNode.Nodes.Add(locString, locString); | |
34 } | |
35 return locListNode; | |
36 } | |
37 } | |
38 } | |
OLD | NEW |