From b87e9331f2cb074fa12687703f2d0e56c29b9945 Mon Sep 17 00:00:00 2001 From: zoltan Date: Tue, 24 Nov 2009 13:03:44 +0000 Subject: [PATCH] 2009-11-19 Zoltan Varga * AssemblyMirror.cs: Add a GetName () method. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/branches/mono-2-6/mcs@146809 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs | 10 ++++++++++ class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog | 4 ++++ class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs | 7 ++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs b/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs index 477f470693..1323ad91ce 100644 --- a/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs +++ b/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs @@ -1,4 +1,5 @@ using System; +using System.Reflection; using Mono.Debugger; using Mono.Cecil; @@ -10,6 +11,7 @@ namespace Mono.Debugger MethodMirror entry_point; bool entry_point_set; ModuleMirror main_module; + AssemblyName aname; AssemblyDefinition meta; internal AssemblyMirror (VirtualMachine vm, long id) : base (vm, id) { @@ -45,6 +47,14 @@ namespace Mono.Debugger } } + public virtual AssemblyName GetName () { + if (aname == null) { + string name = vm.conn.Assembly_GetName (id); + aname = new AssemblyName (name); + } + return aname; + } + public ObjectMirror GetAssemblyObject () { return vm.GetObject (vm.conn.Assembly_GetObject (id)); } diff --git a/class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog b/class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog index 653a5c4bd6..a8573af9fe 100644 --- a/class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog +++ b/class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog @@ -1,3 +1,7 @@ +2009-11-19 Zoltan Varga + + * AssemblyMirror.cs: Add a GetName () method. + 2009-11-17 Zoltan Varga * Connection.cs ObjectMirror.cs: Implement invokes in a real asynchronous way, diff --git a/class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs b/class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs index ecbca12870..36b47a88d3 100644 --- a/class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs +++ b/class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs @@ -314,7 +314,8 @@ namespace Mono.Debugger GET_ENTRY_POINT = 2, GET_MANIFEST_MODULE = 3, GET_OBJECT = 4, - GET_TYPE = 5 + GET_TYPE = 5, + GET_NAME = 6 } enum CmdModule { @@ -1413,6 +1414,10 @@ namespace Mono.Debugger return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_TYPE, new PacketWriter ().WriteId (id).WriteString (name).WriteBool (ignoreCase)).ReadId (); } + public string Assembly_GetName (long id) { + return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_NAME, new PacketWriter ().WriteId (id)).ReadString (); + } + /* * TYPE */ -- 2.11.4.GIT