Exemple #1
0
        internal Module(AppDomain appDomain, ICorDebugModule corModule)
        {
            this.appDomain = appDomain;
            this.process   = appDomain.Process;
            this.corModule = corModule;

            unresolvedAssembly = TypeSystemExtensions.LoadModuleAsync(this, corModule);
            metaData           = new MetaDataImport(corModule);

            if (IsDynamic || IsInMemory)
            {
                name = corModule.GetName();
            }
            else
            {
                fullPath = corModule.GetName();
                name     = System.IO.Path.GetFileName(FullPath);
            }

            SetJITCompilerFlags();

            LoadSymbolsFromDisk(process.Options.SymbolsSearchPaths);
            ResetJustMyCode();
            LoadSymbolsDynamic();
        }
Exemple #2
0
 public uint GetEntryPoint()
 {
     try {
         if (symReader != null)
         {
             return(symReader.GetUserEntryPoint());
         }
         var info        = TypeSystemExtensions.GetInfo(Assembly);
         var cecilModule = info.CecilModule;
         if (cecilModule == null)
         {
             return(0);
         }
         var ep = cecilModule.EntryPoint;
         if (ep != null)
         {
             return(ep.MetadataToken.ToUInt32());
         }
         return(0);
     } catch {
         return(0);
     }
 }