Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2011-10-25 21:46:48 +0400
committerZoltan Varga <vargaz@gmail.com>2011-10-25 21:52:13 +0400
commit1732ac0ebf89507f825724554a392dcb3b184bea (patch)
treed6682460b416d0d91cd98c48939fdbaa2c97e236 /main/contrib
parent854fcf2a6ee522f437e26fc5f15930c819fd4039 (diff)
Update Mono.Debugger.Soft
Diffstat (limited to 'main/contrib')
-rw-r--r--main/contrib/Mono.Debugger.Soft/Makefile.am1
-rw-r--r--main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj1
-rw-r--r--main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs52
-rw-r--r--main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs30
4 files changed, 81 insertions, 3 deletions
diff --git a/main/contrib/Mono.Debugger.Soft/Makefile.am b/main/contrib/Mono.Debugger.Soft/Makefile.am
index 4eb69719b0..e32fc147c2 100644
--- a/main/contrib/Mono.Debugger.Soft/Makefile.am
+++ b/main/contrib/Mono.Debugger.Soft/Makefile.am
@@ -67,6 +67,7 @@ FILES = \
Mono.Debugger.Soft/ThreadMirror.cs \
Mono.Debugger.Soft/ThreadStartEvent.cs \
Mono.Debugger.Soft/TypeLoadEvent.cs \
+ Mono.Debugger.Soft/TypeLoadEventRequest.cs \
Mono.Debugger.Soft/TypeMirror.cs \
Mono.Debugger.Soft/UserBreakEvent.cs \
Mono.Debugger.Soft/UserLogEvent.cs \
diff --git a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj
index 2113ac51d8..1a84d282d1 100644
--- a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj
+++ b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj
@@ -92,6 +92,7 @@
<Compile Include="Mono.Debugger.Soft\ThreadMirror.cs" />
<Compile Include="Mono.Debugger.Soft\ThreadStartEvent.cs" />
<Compile Include="Mono.Debugger.Soft\TypeLoadEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\TypeLoadEventRequest.cs" />
<Compile Include="Mono.Debugger.Soft\TypeMirror.cs" />
<Compile Include="Mono.Debugger.Soft\UserBreakEvent.cs" />
<Compile Include="Mono.Debugger.Soft\UserLogEvent.cs" />
diff --git a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index e63538f241..c8b3132f1a 100644
--- a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -251,6 +251,18 @@ namespace Mono.Debugger.Soft
}
}
+ class SourceFileModifier : Modifier {
+ public string[] SourceFiles {
+ get; set;
+ }
+ }
+
+ class TypeNameModifier : Modifier {
+ public string[] TypeNames {
+ get; set;
+ }
+ }
+
class EventInfo {
public EventType EventType {
get; set;
@@ -341,7 +353,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 6;
+ internal const int MINOR_VERSION = 9;
enum WPSuspendPolicy {
NONE = 0,
@@ -391,7 +403,9 @@ namespace Mono.Debugger.Soft
LOCATION_ONLY = 7,
EXCEPTION_ONLY = 8,
STEP = 10,
- ASSEMBLY_ONLY = 11
+ ASSEMBLY_ONLY = 11,
+ SOURCE_FILE_ONLY = 12,
+ TYPE_NAME_ONLY = 13
}
enum CmdVM {
@@ -404,7 +418,9 @@ namespace Mono.Debugger.Soft
INVOKE_METHOD = 7,
SET_PROTOCOL_VERSION = 8,
ABORT_INVOKE = 9,
- SET_KEEPALIVE = 10
+ SET_KEEPALIVE = 10,
+ GET_TYPES_FOR_SOURCE_FILE = 11,
+ GET_TYPES = 12
}
enum CmdEvent {
@@ -1523,6 +1539,24 @@ namespace Mono.Debugger.Soft
SendReceive (CommandSet.VM, (int)CmdVM.SET_KEEPALIVE, new PacketWriter ().WriteId (keepalive_interval));
}
+ internal long[] VM_GetTypesForSourceFile (string fname, bool ignoreCase) {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.GET_TYPES_FOR_SOURCE_FILE, new PacketWriter ().WriteString (fname).WriteBool (ignoreCase));
+ int count = res.ReadInt ();
+ long[] types = new long [count];
+ for (int i = 0; i < count; ++i)
+ types [i] = res.ReadId ();
+ return types;
+ }
+
+ internal long[] VM_GetTypes (string name, bool ignoreCase) {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.GET_TYPES, new PacketWriter ().WriteString (name).WriteBool (ignoreCase));
+ int count = res.ReadInt ();
+ long[] types = new long [count];
+ for (int i = 0; i < count; ++i)
+ types [i] = res.ReadId ();
+ return types;
+ }
+
/*
* DOMAIN
*/
@@ -1930,6 +1964,18 @@ namespace Mono.Debugger.Soft
w.WriteInt (amod.Assemblies.Length);
foreach (var id in amod.Assemblies)
w.WriteId (id);
+ } else if (mod is SourceFileModifier) {
+ w.WriteByte ((byte)ModifierKind.SOURCE_FILE_ONLY);
+ var smod = (mod as SourceFileModifier);
+ w.WriteInt (smod.SourceFiles.Length);
+ foreach (var s in smod.SourceFiles)
+ w.WriteString (s);
+ } else if (mod is TypeNameModifier) {
+ w.WriteByte ((byte)ModifierKind.TYPE_NAME_ONLY);
+ var tmod = (mod as TypeNameModifier);
+ w.WriteInt (tmod.TypeNames.Length);
+ foreach (var s in tmod.TypeNames)
+ w.WriteString (s);
} else {
throw new NotImplementedException ();
}
diff --git a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
index 59a6c1bf20..0a19a7f717 100644
--- a/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
+++ b/main/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
@@ -211,6 +211,10 @@ namespace Mono.Debugger.Soft
return new AssemblyLoadEventRequest (this);
}
+ public TypeLoadEventRequest CreateTypeLoadRequest () {
+ return new TypeLoadEventRequest (this);
+ }
+
public void EnableEvents (params EventType[] events) {
foreach (EventType etype in events) {
if (etype == EventType.Breakpoint)
@@ -234,6 +238,32 @@ namespace Mono.Debugger.Soft
public void Disconnect () {
conn.Close ();
}
+
+ //
+ // Return a list of TypeMirror objects for all loaded types which reference the
+ // source file FNAME. Might return false positives.
+ // Since protocol version 2.7.
+ //
+ public IList<TypeMirror> GetTypesForSourceFile (string fname, bool ignoreCase) {
+ long[] ids = conn.VM_GetTypesForSourceFile (fname, ignoreCase);
+ var res = new TypeMirror [ids.Length];
+ for (int i = 0; i < ids.Length; ++i)
+ res [i] = GetType (ids [i]);
+ return res;
+ }
+
+ //
+ // Return a list of TypeMirror objects for all loaded types named 'NAME'.
+ // NAME should be in the the same for as with Assembly.GetType ().
+ // Since protocol version 2.9.
+ //
+ public IList<TypeMirror> GetTypes (string name, bool ignoreCase) {
+ long[] ids = conn.VM_GetTypes (name, ignoreCase);
+ var res = new TypeMirror [ids.Length];
+ for (int i = 0; i < ids.Length; ++i)
+ res [i] = GetType (ids [i]);
+ return res;
+ }
internal void queue_event_set (EventSet es) {
lock (queue_monitor) {