internal UnloadedReferenceType(VirtualMachine virtualMachine, string signature)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     Contract.Requires(!string.IsNullOrEmpty(signature));
     _signature = signature;
 }
Example #2
0
        internal Location(VirtualMachine virtualMachine, Method method, long codeIndex, int lineNumber)
            : this(virtualMachine, method, codeIndex)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires(method != null);

            _lineNumber = lineNumber;
        }
Example #3
0
        internal ObjectReference(VirtualMachine virtualMachine, ObjectId objectId, IReferenceType referenceType)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires<ArgumentException>(objectId.Handle != 0);

            _objectId = objectId;
            _referenceType = referenceType;
        }
Example #4
0
        internal Location(VirtualMachine virtualMachine, Method method, long codeIndex)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires<ArgumentNullException>(method != null, "method");

            _method = method;
            _codeIndex = codeIndex;
        }
Example #5
0
        public LocalVariable(VirtualMachine virtualMachine, Method method, Types.VariableData variableData)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires<ArgumentNullException>(method != null, "method");

            _method = method;
            _variableData = variableData;
        }
Example #6
0
        internal UnloadedArrayType(VirtualMachine virtualMachine, string signature)
            : base(virtualMachine, signature)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires(!string.IsNullOrEmpty(signature));

            _componentSignature = Signature.Substring(1);
            _componentTypeName = SignatureHelper.DecodeTypeName(_componentSignature);
            _componentType = new UnloadedReferenceType(VirtualMachine, _componentSignature);
        }
Example #7
0
        internal StackFrame(VirtualMachine virtualMachine, Types.FrameId frameId, ThreadReference thread, Location location)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires<ArgumentNullException>(thread != null, "thread");
            Contract.Requires<ArgumentNullException>(location != null, "location");

            _thread = thread;
            _frameId = frameId;
            _location = location;
        }
Example #8
0
        protected TypeComponent(VirtualMachine virtualMachine, ReferenceType declaringType, string name, string signature, string genericSignature, AccessModifiers modifiers)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);
            Contract.Requires<ArgumentNullException>(declaringType != null, "declaringType");

            _declaringType = declaringType;
            _name = name;
            _signature = signature;
            _genericSignature = genericSignature;
            _modifiers = modifiers;
        }
Example #9
0
        internal Method(VirtualMachine virtualMachine, ReferenceType declaringType, string name, string signature, string genericSignature, AccessModifiers modifiers, MethodId methodId)
            : base(virtualMachine, declaringType, name, signature, genericSignature, modifiers)
        {
            Contract.Requires(virtualMachine != null);
            _methodId = methodId;

            List<string> argumentTypeSignatures;
            string returnTypeSignature;
            SignatureHelper.ParseMethodSignature(signature, out argumentTypeSignatures, out returnTypeSignature);

            _argumentTypeSignatures = argumentTypeSignatures.AsReadOnly();
            _argumentTypeNames = argumentTypeSignatures.Select(SignatureHelper.DecodeTypeName).ToList().AsReadOnly();
            _returnTypeSignature = returnTypeSignature;
            _returnTypeName = SignatureHelper.DecodeTypeName(_returnTypeSignature);
        }
Example #10
0
        public PrimitiveTypes(VirtualMachine virtualMachine)
        {
            Contract.Requires<ArgumentNullException>(virtualMachine != null, "virtualMachine");

            _boolean = new BooleanType(virtualMachine);
            _byte = new ByteType(virtualMachine);
            _integer = new IntegerType(virtualMachine);
            _long = new LongType(virtualMachine);
            _float = new FloatType(virtualMachine);
            _double = new DoubleType(virtualMachine);
            _short = new ShortType(virtualMachine);
            _char = new CharType(virtualMachine);
            _void = new VoidType(virtualMachine);

            _voidValue = new VoidValue(virtualMachine);
        }
Example #11
0
 internal BooleanValue(VirtualMachine virtualMachine, bool value)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _value = value;
 }
 internal ThreadGroupReference(VirtualMachine virtualMachine, ThreadGroupId threadGroupId)
     : base(virtualMachine, threadGroupId, null)
 {
     Contract.Requires(virtualMachine != null);
 }
Example #13
0
 internal FloatValue(VirtualMachine virtualMachine, float value)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _value = value;
 }
Example #14
0
 protected ReferenceType(VirtualMachine virtualMachine, TaggedReferenceTypeId taggedTypeId)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _taggedTypeId = taggedTypeId;
 }
Example #15
0
 internal CharType(VirtualMachine virtualMachine)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
 }
Example #16
0
 protected PrimitiveType(VirtualMachine virtualMachine)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
 }
Example #17
0
 internal ShortValue(VirtualMachine virtualMachine, short value)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _value = value;
 }
Example #18
0
 internal ClassType(VirtualMachine virtualMachine, ClassId typeId)
     : base(virtualMachine, new TaggedReferenceTypeId(TypeTag.Class, typeId))
 {
     Contract.Requires(virtualMachine != null);
 }
Example #19
0
 internal CharValue(VirtualMachine virtualMachine, char value)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _value = value;
 }
Example #20
0
 internal DoubleValue(VirtualMachine virtualMachine, double value)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _value = value;
 }
Example #21
0
 internal ThreadReference(VirtualMachine virtualMachine, ThreadId threadId, IReferenceType threadType)
     : base(virtualMachine, threadId, threadType)
 {
     Contract.Requires(virtualMachine != null);
 }
 internal ClassLoaderReference(VirtualMachine virtualMachine, ClassLoaderId classLoaderId)
     : base(virtualMachine, classLoaderId, null)
 {
     Contract.Requires(virtualMachine != null);
 }
Example #23
0
 internal IntegerValue(VirtualMachine virtualMachine, int value)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _value = value;
 }
Example #24
0
 public VoidValue(VirtualMachine virtualMachine)
     : base(virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
 }
Example #25
0
 internal ArrayReference(VirtualMachine virtualMachine, ArrayId arrayId, IReferenceType arrayType)
     : base(virtualMachine, arrayId, arrayType)
 {
     Contract.Requires(virtualMachine != null);
 }
Example #26
0
 protected Mirror(VirtualMachine virtualMachine)
 {
     Contract.Requires<ArgumentNullException>(virtualMachine != null, "virtualMachine");
     _virtualMachine = virtualMachine;
 }
 public DebugProtocolCallback(VirtualMachine virtualMachine)
 {
     Contract.Requires(virtualMachine != null);
     _virtualMachine = virtualMachine;
 }
Example #28
0
        internal static VirtualMachine BeginAttachToProcess(int processId, string[] sourcePaths)
        {
            string wmiQuery = string.Format("select CommandLine from Win32_Process where ProcessId={0}", processId);
            ManagementObjectSearcher searcher = new ManagementObjectSearcher(wmiQuery);
            ManagementObjectCollection collection = searcher.Get();
            string commandLine = null;
            foreach (ManagementObject managementObject in collection)
            {
                commandLine = (string)managementObject["CommandLine"];
                break;
            }

            bool jdwp = false;
            if (!string.IsNullOrEmpty(commandLine) && commandLine.IndexOf("-Xrunjdwp:", StringComparison.Ordinal) >= 0)
                jdwp = true;

            VirtualMachine virtualMachine = new VirtualMachine(sourcePaths, jdwp);
            if (!jdwp)
            {
                virtualMachine._ipcHandle = new EventWaitHandle(false, EventResetMode.ManualReset, string.Format("JavaDebuggerInitHandle{0}", processId));
            }

            Task initializeTask = Task.Factory.StartNew(virtualMachine.InitializeServicesAfterProcessStarts).HandleNonCriticalExceptions();

            return virtualMachine;
        }
Example #29
0
 internal Field(VirtualMachine virtualMachine, ReferenceType declaringType, string name, string signature, string genericSignature, AccessModifiers modifiers, FieldId fieldId)
     : base(virtualMachine, declaringType, name, signature, genericSignature, modifiers)
 {
     Contract.Requires(virtualMachine != null);
     _fieldId = fieldId;
 }
Example #30
0
 internal ArrayType(VirtualMachine virtualMachine, ArrayTypeId typeId)
     : base(virtualMachine, new TaggedReferenceTypeId(TypeTag.Array, typeId))
 {
     Contract.Requires(virtualMachine != null);
 }