From b3856a491bf2d914009fc6810fd7cfc7a999ed5f Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Tue, 29 Mar 2005 09:10:19 +0000 Subject: [PATCH] 2005-03-29 Zoltan Varga * symbols.cs: Update to latest Mono.CompilerServices.SymbolWriter. * Makefile: Disable building of nunit-console.exe for now. svn path=/trunk/monocov/; revision=42324 --- ChangeLog | 6 ++++++ Makefile | 4 ++-- symbols.cs | 8 +++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8356953..996ad70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-03-29 Zoltan Varga + + * symbols.cs: Update to latest Mono.CompilerServices.SymbolWriter. + + * Makefile: Disable building of nunit-console.exe for now. + 2004-12-06 Zoltan Varga * coverage.c *.cs Makefile: Applied patch from Mike Tindal (mtindal@paradoxpoint.com). Fix compilation problems on HEAD. diff --git a/Makefile b/Makefile index 4d85a9f..c9824cd 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PROJECTNAME = monocov GUI = gtk MONO_ROOT = ../mono -all: monocov.exe libmono-profiler-monocov.so symbols.exe nunit-console.exe +all: monocov.exe libmono-profiler-monocov.so symbols.exe ifeq ($(GUI), gtk) GUI_SRCS = \ @@ -47,7 +47,7 @@ symbols.exe: symbols.cs mcs -g /target:exe /out:$@ -r Mono.CompilerServices.SymbolWriter symbols.cs nunit-console.exe: nunit-console.cs - mcs -r nunit.framework -r Mono.GetOptions nunit-console.cs + mcs -r nunit.framework -r nunit.core -r nunit.util -r Mono.GetOptions nunit-console.cs libmono-profiler-monocov.so: coverage.c $(CC) -g -I$(MONO_ROOT) `pkg-config --cflags glib-2.0` --shared -o $@ $^ diff --git a/symbols.cs b/symbols.cs index db81ee6..37bb84a 100644 --- a/symbols.cs +++ b/symbols.cs @@ -16,7 +16,7 @@ public class SymbolDumper { string assemblyName = args [0]; string methodNamePattern = args [1]; - Assembly assembly = Assembly.LoadFrom (args [0]); + Assembly assembly = Assembly.LoadFrom (assemblyName); Console.WriteLine ("Reading symbols for " + assembly + " ..."); MonoSymbolFile symbolFile = MonoSymbolFile.ReadSymbolFile (assembly); @@ -31,8 +31,10 @@ public class SymbolDumper { LineNumberEntry[] lines = entry.LineNumbers; - if (entry.Name.IndexOf (methodNamePattern) != -1) { - Console.WriteLine ("METHOD: " + entry.Name + "[" + entry.Token + "]"); + MethodBase mi = MonoDebuggerSupport.GetMethod (assembly, entry.Token); + + if (mi.Name.IndexOf (methodNamePattern) != -1) { + Console.WriteLine (mi.DeclaringType.FullName + ":" + mi.Name + " " + entry); foreach (LineNumberEntry line in lines) Console.WriteLine ("\t" + line);