This property uses the new CMD_STACK_FRAME_GET_DOMAIN command
to retrieve and cache the domain in which the stack frame
is executing.
Bump the protocol version to match the runtime.
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 37;
+ internal const int MINOR_VERSION = 38;
enum WPSuspendPolicy {
NONE = 0,
enum CmdStackFrame {
GET_VALUES = 1,
GET_THIS = 2,
- SET_VALUES = 3
+ SET_VALUES = 3,
+ GET_DOMAIN = 4,
}
enum CmdArrayRef {
SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_VALUES, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteInt (len).WriteInts (pos).WriteValues (values));
}
+ internal long StackFrame_GetDomain (long thread_id, long id) {
+ return SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_DOMAIN, new PacketWriter ().WriteId (thread_id).WriteId (id)).ReadId ();
+ }
+
/*
* ARRAYS
*/
public class StackFrame : Mirror
{
ThreadMirror thread;
+ AppDomainMirror domain;
MethodMirror method;
int il_offset;
Location location;
}
}
+ public AppDomainMirror Domain {
+ get {
+ vm.CheckProtocolVersion (2, 38);
+ if (domain == null)
+ domain = vm.GetDomain (vm.conn.StackFrame_GetDomain (thread.Id, Id));
+
+ return domain;
+ }
+ }
+
public MethodMirror Method {
get {
return method;