internal UTF8String CalculateDnlibName(CorModule module) { var mdi = this.GetMetaDataInterface <IMetaDataImport>(); uint token = new MDToken(Table.Module, 1).Raw; return(DotNet.Utils.GetUTF8String(MDAPI.GetUtf8Name(mdi, token), MDAPI.GetModuleName(mdi) ?? string.Empty)); }
public CorExceptionObjectStackFrame(CorDebugExceptionObjectStackFrame other) { this.Module = other.pModule == null ? null : new CorModule(other.pModule); this.IP = other.ip; this.Token = other.methodDef; this.IsLastForeignExceptionFrame = other.isLastForeignExceptionFrame; }
internal DnModule(DnAssembly ownerAssembly, ICorDebugModule module, int incrementedId, int moduleOrder) { this.ownerAssembly = ownerAssembly; this.module = new CorModule(module); this.incrementedId = incrementedId; this.moduleOrder = moduleOrder; }
internal DnModule(DnAssembly ownerAssembly, ICorDebugModule module, int uniqueId, int uniqueIdProcess, int uniqueIdAppDomain) { Assembly = ownerAssembly; CorModule = new CorModule(module); UniqueId = uniqueId; UniqueIdProcess = uniqueIdProcess; UniqueIdAppDomain = uniqueIdAppDomain; DnModuleId = CorModule.GetModuleId((uint)UniqueId); }
internal DnModule(DnAssembly ownerAssembly, ICorDebugModule module, int uniqueId, int uniqueIdProcess, int uniqueIdAppDomain) { this.ownerAssembly = ownerAssembly; this.module = new CorModule(module); this.uniqueId = uniqueId; this.uniqueIdProcess = uniqueIdProcess; this.uniqueIdAppDomain = uniqueIdAppDomain; this.serializedDnModule = this.module.SerializedDnModule; }
bool IsOurModule(CorModule module, out string filename) { if (IsModule(module, filename1)) { filename = filename1; return(true); } if (IsModule(module, filename2)) { filename = filename2; return(true); } filename = null; return(false); }
static string CalculateFullName(CorModule manifestModule) { var mdai = manifestModule.GetMetaDataInterface <IMetaDataAssemblyImport>(); uint token = new MDToken(Table.Assembly, 1).Raw; var asm = new AssemblyNameInfo(); asm.Name = MDAPI.GetAssemblySimpleName(mdai, token) ?? string.Empty; asm.Version = MDAPI.GetAssemblyVersionAndLocale(mdai, token, out var locale) ?? new Version(0, 0, 0, 0); asm.Culture = locale ?? string.Empty; asm.HashAlgId = MDAPI.GetAssemblyHashAlgorithm(mdai, token) ?? AssemblyHashAlgorithm.SHA1; asm.Attributes = MDAPI.GetAssemblyAttributes(mdai, token) ?? AssemblyAttributes.None; asm.PublicKeyOrToken = MDAPI.GetAssemblyPublicKey(mdai, token) ?? new PublicKey((byte[]?)null); return(asm.FullName); }
internal IDebuggerModule FindModuleUI(DBG.CorModule corModule) { dispatcher.VerifyAccess(); var dbg = theDebugger.Debugger; if (dbg == null) { return(null); } foreach (var m in dbg.Modules) { if (m.CorModule == corModule) { return(new DebuggerModule(this, m)); } } return(null); }
static bool IsModule(CorModule module, string filename) => module != null && !module.IsDynamic && !module.IsInMemory && StringComparer.OrdinalIgnoreCase.Equals(module.Name, filename);
bool IsOurModule(CorModule module) => IsModule(module, filename);
public bool Equals(CorModule other) => !ReferenceEquals(other, null) && RawObject == other.RawObject;
public bool Equals(CorModule other) { return(!ReferenceEquals(other, null) && RawObject == other.RawObject); }
public CorFunction(ICorDebugFunction func, CorModule module = null) : base(func) { //TODO: ICorDebugFunction2::EnumerateNativeCode //TODO: ICorDebugFunction3::GetActiveReJitRequestILCode }
bool IsOurModule(CorModule module) { return(IsModule(module, filename)); }
public CorFunction(ICorDebugFunction func, CorModule module = null) : base(func) { }
static bool IsModule(CorModule module, string filename) { return(module != null && module.SerializedDnModule == new SerializedDnModule(filename)); }
bool IsFile(CorModule module) => !module.IsDynamic && !module.IsInMemory;