protected MonoMethod GetMonoMethod(MethodHashEntry hash, int index, byte[] contents) { ensure_sources (); if (File == null) return null; MonoMethod method = (MonoMethod) method_hash [hash]; if (method == null) { MonoMethodSource source = GetMethodSource (index); method = new MonoMethod ( this, source, hash.Domain, source.Entry, source.Method); method_hash.Add (hash, method); } if (!method.IsLoaded) { TargetBinaryReader reader = new TargetBinaryReader (contents, TargetMemoryInfo); method.Load (reader, TargetMemoryInfo.AddressDomain); } return method; }
protected WrapperMethod GetWrapperMethod(MethodHashEntry hash, WrapperEntry wrapper, byte[] contents) { WrapperMethod method = (WrapperMethod) wrapper_hash [hash]; if (method == null) { method = new WrapperMethod (this, hash.Domain, wrapper); wrapper_hash.Add (hash, method); } if (!method.IsLoaded) { TargetBinaryReader reader = new TargetBinaryReader (contents, TargetMemoryInfo); method.Load (reader, TargetMemoryInfo.AddressDomain); } return method; }
private RangeEntry(MonoSymbolFile file, int domain, int index, WrapperEntry wrapper, TargetAddress method, TargetAddress start_address, TargetAddress end_address, byte[] contents) : base(start_address, end_address) { this.File = file; this.Index = index; this.Hash = new MethodHashEntry (method, domain); this.Wrapper = wrapper; this.Contents = contents; }