struct SourceInfo {
public string source_file;
- public byte[] guid, hash;
+ public byte[] hash;
}
class DebugInfo {
public string[] names;
public int[] live_range_start;
public int[] live_range_end;
+ public int[] scopes_start;
+ public int[] scopes_end;
}
struct PropInfo {
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 42;
+ internal const int MINOR_VERSION = 45;
enum WPSuspendPolicy {
NONE = 0,
GET_MANIFEST_MODULE = 3,
GET_OBJECT = 4,
GET_TYPE = 5,
- GET_NAME = 6
+ GET_NAME = 6,
+ GET_DOMAIN = 7
}
enum CmdModule {
GET_THIS = 2,
SET_VALUES = 3,
GET_DOMAIN = 4,
+ SET_THIS = 5,
}
enum CmdArrayRef {
bool res = ReceivePacket ();
if (!res)
break;
+ } catch (ThreadAbortException) {
+ break;
} catch (Exception ex) {
if (!closed) {
Console.WriteLine (ex);
var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_LOCALS_INFO, new PacketWriter ().WriteId (id));
LocalsInfo info = new LocalsInfo ();
+
+ if (Version.AtLeast (2, 43)) {
+ int nscopes = res.ReadInt ();
+ info.scopes_start = new int [nscopes];
+ info.scopes_end = new int [nscopes];
+ int last_start = 0;
+ for (int i = 0; i < nscopes; ++i) {
+ info.scopes_start [i] = last_start + res.ReadInt ();
+ info.scopes_end [i] = info.scopes_start [i] + res.ReadInt ();
+ last_start = info.scopes_start [i];
+ }
+ }
+
int nlocals = res.ReadInt ();
info.types = new long [nlocals];
for (int i = 0; i < nlocals; ++i)
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
}
+ internal long Assembly_GetIdDomain (long id) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_DOMAIN, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
/*
* TYPE
*/
internal ValueImpl[] Type_GetValues (long id, long[] fields, long thread_id) {
int len = fields.Length;
PacketReader r;
- if (thread_id != 0)
+ if (thread_id != 0 && Version.AtLeast(2, 3))
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES_2, new PacketWriter ().WriteId (id).WriteId (thread_id).WriteInt (len).WriteIds (fields));
else
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
return SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_DOMAIN, new PacketWriter ().WriteId (thread_id).WriteId (id)).ReadId ();
}
+ internal void StackFrame_SetThis (long thread_id, long id, ValueImpl value) {
+ SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_THIS, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteValue (value));
+ }
+
/*
* ARRAYS
*/