public void LoadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
		{
			EnterCallback(PausedReason.Other, "LoadClass", pAppDomain);
			
			ExitCallback_Continue();
		}
		public void UnloadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
		{
			EnterCallback("UnloadClass", pAppDomain);
			
			ExitCallback();
		}
 internal RuntimeClass(NetDebuggerSession session, ICorDebugClass comClass)
 {
     _session = session;
     _comClass = comClass;
 }
Exemple #4
0
 internal uint _FindFieldTokenByName(IMetaDataImport importer, ICorDebugClass iclass, uint[] fieldtoks, string name)
 {
     uint classtok;
     iclass.GetToken(out classtok);
     return _FindFieldTokenByName(importer, classtok, fieldtoks, name);
 }
Exemple #5
0
 internal CorClass(ICorDebugClass managedClass)
     : base(managedClass)
 {
     m_class = managedClass;
 }
		public UnloadClassDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
			: base(pAppDomain, c) {
		}
 public virtual void UnloadClass(ICorDebugAppDomain appDomain, ICorDebugClass @class)
 {
     this.DefaultHandler(appDomain);
 }
 public CorClass(ICorDebugClass corClass)
 {
     m_corClass = corClass;
     m_corClass.GetModule(out m_module);
 }
 public CorClass(ICorDebugClass corClass, ICorDebugModule module)
 {
     m_corClass = corClass;
     m_module = module;
 }
        int ICorDebugObjectValue.GetFieldValue( ICorDebugClass pClass, uint fieldDef, out ICorDebugValue ppValue )
        {
            //cache fields?
            RuntimeValue rtv = m_rtv.GetField( 0, TinyCLR_TypeSystem.ClassMemberIndexFromCLRToken( fieldDef, ((CorDebugClass)pClass).Assembly ) );

            ppValue = CreateValue( rtv );

            return Utility.COM_HResults.S_OK;                 
        }
		public void UnloadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
		{
			EnterCallback(PausedReason.Other, "UnloadClass", pAppDomain);
			
			ExitCallback();
		}
        int ICorDebugObjectValue.GetClass( out ICorDebugClass ppClass )
        {
            ppClass = m_class;

            return Utility.COM_HResults.S_OK;            
        }
 int ICorDebugType.GetClass (out ICorDebugClass ppClass)
 {
     ppClass = CorDebugValue.ClassFromRuntimeValue(m_ValueArray.RuntimeValue, m_ValueArray.AppDomain);
     return Utility.COM_HResults.S_OK;
 }
        int ICorDebugModule.GetClassFromToken( uint typeDef, out ICorDebugClass ppClass )
        {
            ppClass = GetClassFromTokenCLR( typeDef );

            return Utility.COM_HResults.S_OK;
        }
		public void UnloadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
		{
			ManagedCallback managedCallback = GetProcessCallbackInterface("UnloadClass", pAppDomain);
			if (managedCallback != null) {
				managedCallback.UnloadClass(pAppDomain, c);
			}
		}
 public static ICorDebugValue GetFieldValue(this ICorDebugObjectValue instance, ICorDebugClass pClass, uint fieldDef)
 {
     ICorDebugValue ppValue;
     instance.__GetFieldValue(pClass, fieldDef, out ppValue);
     return ppValue;
 }
		protected ClassDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
			: base(pAppDomain) {
			this.AppDomain = pAppDomain;
			this.Class = c;
		}
 public static void NewArray(this ICorDebugEval instance, uint elementType, ICorDebugClass pElementClass, uint rank, ref uint dims, ref uint lowBounds)
 {
     instance.__NewArray(elementType, pElementClass, rank, ref dims, ref lowBounds);
 }
Exemple #19
0
 public void UnloadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
 {
     pAppDomain.Continue(0);
 }
 public static void NewObjectNoConstructor(this ICorDebugEval instance, ICorDebugClass pClass)
 {
     instance.__NewObjectNoConstructor(pClass);
 }
Exemple #21
0
 internal uint[] _GetFieldTokens(IMetaDataImport importer, ICorDebugClass iclass)
 {
     uint ctoken;
     iclass.GetToken(out ctoken);
     uint henum = 0;
     List<uint> fieldtoks = new List<uint>();
     try
     {
         uint[] aonefieldtok = new uint[1];
         for (; ; )
         {
             uint count;
             importer.EnumFields(ref henum, ctoken, aonefieldtok, 1, out count);
             if (1 != count)
             {
                 break;
             }
             fieldtoks.Add(aonefieldtok[0]);
         }
     }
     finally
     {
         importer.CloseEnum(henum);
     }
     return fieldtoks.ToArray();
 }
 public static void NewParameterizedObjectNoConstructor(this ICorDebugEval2 instance, ICorDebugClass pClass, uint nTypeArgs, ICorDebugType[] ppTypeArgs)
 {
     instance.__NewParameterizedObjectNoConstructor(pClass, nTypeArgs, ppTypeArgs);
 }
Exemple #23
0
            public void UnloadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
            {
                try
                {
                    _EnterCallback();

                    _CallbackNotImplemented();

                    _CallbackEvent("UnloadClass");
                }
                catch (Exception e)
                {
                    _CallbackException(e);
                }
            }
 public static ICorDebugValue CreateValue(this ICorDebugEval instance, uint elementType, ICorDebugClass pElementClass)
 {
     ICorDebugValue ppValue;
     instance.__CreateValue(elementType, pElementClass, out ppValue);
     return ppValue;
 }
		public void LoadClass(ICorDebugAppDomain pAppDomain, ICorDebugClass c)
		{
			EnterCallback("LoadClass", pAppDomain);
			
			Module module = process.GetModule(c.GetModule());
			
			// Dynamic module has been extended - reload symbols to inlude new class
			module.LoadSymbolsDynamic();
			
			ExitCallback();
		}
Exemple #26
0
		DebugType(Process process, ICorDebugType corType)
		{
			if (corType == null) throw new ArgumentNullException("corType");
			
			this.process = process;
			this.corType = corType;
			this.corElementType = (CorElementType)corType.Type;
			
			if (this.IsClass || this.IsValueType) {
				this.corClass = corType.Class;
				this.module = process.GetModule(corClass.Module);
				this.classProps = module.MetaData.GetTypeDefProps(corClass.Token);
			}
			
			if (this.IsClass || this.IsValueType || this.IsArray || this.IsPointer) {
				foreach(ICorDebugType t in corType.EnumerateTypeParameters().Enumerator) {
					typeArguments.Add(DebugType.Create(process, t));
				}
			}
			
			this.fullName = GetFullName();
		}
        int ICorDebugFunction.GetClass( out ICorDebugClass ppClass )
        {
            ppClass = m_class;

            return Utility.COM_HResults.S_OK;
        }
Exemple #28
0
		static public DebugType Create(Process process, ICorDebugClass corClass, params ICorDebugType[] typeArguments)
		{
			MetaData metaData = process.GetModule(corClass.Module).MetaData;
			
			bool isValueType = false;
			uint superClassToken = metaData.GetTypeDefProps(corClass.Token).SuperClassToken;
			if ((superClassToken & 0xFF000000) == 0x02000000) { // TypeDef
				if (metaData.GetTypeDefProps(superClassToken).Name == "System.ValueType") {
					isValueType = true;
				}
			}
			if ((superClassToken & 0xFF000000) == 0x01000000) { // TypeRef
				if (metaData.GetTypeRefProps(superClassToken).Name == "System.ValueType") {
					isValueType = true;
				}
			}
			
			int getArgsCount = metaData.GetGenericParamCount(corClass.Token);
			
			Array.Resize(ref typeArguments, getArgsCount);
			ICorDebugType corType = corClass.CastTo<ICorDebugClass2>().GetParameterizedType(
				isValueType ? (uint)CorElementType.VALUETYPE : (uint)CorElementType.CLASS,
				typeArguments
			);
			
			return Create(process, corType);
		}
Exemple #29
0
 void ICorDebugManagedCallback.UnloadClass(
                          ICorDebugAppDomain appDomain,
                          ICorDebugClass c)
 {
     HandleEvent(ManagedCallbackType.OnClassUnload,
                       new CorClassEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
                                              c == null ? null : new CorClass(c),
                                              ManagedCallbackType.OnClassUnload));
 }
		public static ICorDebugValue GetFieldValue(this ICorDebugContext instance, ICorDebugClass pClass, uint fieldDef)
		{
			ICorDebugValue ppValue;
			instance.__GetFieldValue(pClass, fieldDef, out ppValue);
			ProcessOutParameter(ppValue);
			return ppValue;
		}