internal DbgDotNetValue CreateDotNetValue_MonoDebug(DmdAppDomain reflectionAppDomain, Value value, DmdType realTypeOpt) { debuggerThread.VerifyAccess(); if (value == null) { return(new SyntheticNullValue(realTypeOpt ?? reflectionAppDomain.System_Object)); } DmdType type; if (value is PrimitiveValue pv) { type = MonoValueTypeCreator.CreateType(this, value, reflectionAppDomain.System_Object); } else if (value is StructMirror sm) { type = GetReflectionType(reflectionAppDomain, sm.Type, realTypeOpt); } else { Debug.Assert(value is ObjectMirror); type = GetReflectionType(reflectionAppDomain, ((ObjectMirror)value).Type, realTypeOpt); } var valueLocation = new NoValueLocation(type, value); return(CreateDotNetValue_MonoDebug(valueLocation)); }
internal DbgDotNetValue CreateDotNetValue_MonoDebug(DmdAppDomain reflectionAppDomain, Value value, DmdType?realTypeOpt) { debuggerThread.VerifyAccess(); if (value is null) { return(new SyntheticNullValue(realTypeOpt ?? reflectionAppDomain.System_Object)); } DmdType type; if (value is PrimitiveValue pv || value is PointerValue ptr) { type = MonoValueTypeCreator.CreateType(this, value, reflectionAppDomain.System_Object); }