private void renderDebugFunction(SmxDebugSymbolsTable syms, TreeNode root, DebugSymbolEntry fun) { root.Tag = new NodeData(delegate() { renderSymbolDetail(fun); }, null); var args = new List <DebugSymbolEntry>(); var locals = new List <DebugSymbolEntry>(); foreach (var sym_ in syms.Entries) { var sym = sym_; if (sym.Scope == SymScope.Global) { continue; } if (sym.CodeStart < fun.CodeStart || sym.CodeEnd > fun.CodeEnd) { continue; } if (sym.Address < 0) { locals.Add(sym); } else { args.Add(sym); } } args.Sort(delegate(DebugSymbolEntry e1, DebugSymbolEntry e2) { return(e1.Address.CompareTo(e2.Address)); }); foreach (var sym_ in args) { var sym = sym_; var node = root.Nodes.Add(sym.Name); node.Tag = new NodeData(delegate() { renderSymbolDetail(sym); }, null); } locals.Sort(delegate(DebugSymbolEntry e1, DebugSymbolEntry e2) { return(e1.CodeStart.CompareTo(e2.CodeStart)); }); foreach (var sym_ in locals) { var sym = sym_; var node = root.Nodes.Add(sym.Name); node.Tag = new NodeData(delegate() { renderSymbolDetail(sym); }, null); } }
private void RenderDebugSymbols(TreeViewItem root, SmxDebugSymbolsTable syms) { var globals = root.Items.Add("globals"); foreach (var sym_ in syms.Entries) { var sym = sym_; if (sym.Scope != SymScope.Global) { continue; } if (sym.Ident == SymKind.Function) { continue; } var node = new TreeViewItem() { Header = sym.Name }; root.Items.Add(node); node.Tag = new NodeData(delegate() { RenderSymbolDetail(sym); }, null); } var functions = root.Items.Add("functions"); foreach (var sym_ in syms.Entries) { var sym = sym_; if (sym.Scope != SymScope.Global) { continue; } if (sym.Ident != SymKind.Function) { continue; } var node = new TreeViewItem() { Header = sym.Name }; root.Items.Add(node); RenderDebugFunction(syms, node, sym); } }
private void renderDebugSymbols(TreeNode root, SmxDebugSymbolsTable syms) { var globals = root.Nodes.Add("globals"); foreach (var sym_ in syms.Entries) { var sym = sym_; if (sym.Scope != SymScope.Global) { continue; } if (sym.Ident == SymKind.Function) { continue; } var node = globals.Nodes.Add(sym.Name); node.Tag = new NodeData(delegate() { renderSymbolDetail(sym); }, null); } var functions = root.Nodes.Add("functions"); foreach (var sym_ in syms.Entries) { var sym = sym_; if (sym.Scope != SymScope.Global) { continue; } if (sym.Ident != SymKind.Function) { continue; } var node = functions.Nodes.Add(sym.Name); renderDebugFunction(syms, node, sym); } }