示例#1
0
        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;
        }
示例#2
0
            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;
            }
示例#3
0
            public static RangeEntry Create(MonoSymbolFile file, TargetMemoryAccess memory,
							 TargetReader reader, byte[] contents)
            {
                int domain = reader.BinaryReader.ReadInt32 ();
                int index = reader.BinaryReader.ReadInt32 ();

                TargetAddress wrapper_data = reader.ReadAddress ();
                TargetAddress method = reader.ReadAddress ();
                reader.ReadAddress (); /* address_list */
                TargetAddress code_start = reader.ReadAddress ();
                TargetAddress wrapper_addr = reader.ReadAddress ();
                int code_size = reader.BinaryReader.ReadInt32 ();

                WrapperEntry wrapper = null;

                if (!wrapper_data.IsNull) {
                    int wrapper_size = 4 + 3 * memory.TargetMemoryInfo.TargetAddressSize;

                    TargetReader wrapper_reader = new TargetReader (
                        memory.ReadMemory (wrapper_data, wrapper_size));

                    TargetAddress name_address = wrapper_reader.ReadAddress ();
                    TargetAddress cil_address = wrapper_reader.ReadAddress ();
                    int wrapper_type = wrapper_reader.BinaryReader.ReadInt32 ();

                    string name = "<" + memory.ReadString (name_address) + ">";
                    string cil_code = memory.ReadString (cil_address);

                    wrapper = new WrapperEntry (
                        wrapper_addr, (WrapperType) wrapper_type, name, cil_code);
                }

                return new RangeEntry (
                    file, domain, index, wrapper, method,
                    code_start, code_start + code_size, contents);
            }
示例#4
0
 public WrapperMethod(MonoSymbolFile file, int domain, WrapperEntry entry)
     : base(entry.Name, file.ImageFile, file.Module)
 {
     this.File = file;
     this.Entry = entry;
     this.domain = domain;
     source = new WrapperMethodSource (this);
     SetWrapperType (entry.WrapperType);
 }