Пример #1
0
 // <summary>
 //   This is not what it looks like.
 //   Never use this constructor unless you know exactly what you're doing.
 // </summary>
 public TargetAddress(AddressDomain domain, long address)
 {
     this.domain = domain;
     // FIXME: hack
     // address &= 0x00000000ffffffffL;
     this.address = (ulong)address;
 }
Пример #2
0
 // <summary>
 //   This is not what it looks like.
 //   Never use this constructor unless you know exactly what you're doing.
 // </summary>
 public TargetAddress(AddressDomain domain, long address)
 {
     this.domain = domain;
     // FIXME: hack
     // address &= 0x00000000ffffffffL;
     this.address = (ulong) address;
 }
Пример #3
0
 internal TargetMemoryInfo(int target_int_size, int target_long_size,
                           int target_address_size, bool is_bigendian,
                           AddressDomain domain)
     : base(target_int_size, target_long_size, target_address_size,
            is_bigendian)
 {
     this.address_domain = domain;
 }
Пример #4
0
        internal TargetMemoryInfo(int target_int_size, int target_long_size,
					   int target_address_size, bool is_bigendian,
					   AddressDomain domain)
            : base(target_int_size, target_long_size, target_address_size,
				is_bigendian)
        {
            this.address_domain = domain;
        }
Пример #5
0
        public override bool Equals(object o)
        {
            if (o == null || !(o is AddressDomain))
            {
                return(false);
            }

            AddressDomain b = (AddressDomain)o;

            return((id == b.id) && (name == b.name));
        }
Пример #6
0
        public MethodAddress(TargetBinaryReader reader,
				      AddressDomain domain, Architecture arch)
        {
            // here we read the MonoDebugMethodAddress structure
            // as written out in mono_debug_add_method.
            reader.Position = 16;
            ReadAddress (reader, domain); // wrapper_data
            MonoMethod = ReadAddress (reader, domain);
            ReadAddress (reader, domain); // address_list
            StartAddress = ReadAddress (reader, domain);
            WrapperAddress = ReadAddress (reader, domain);
            int code_size = reader.ReadInt32 ();

            EndAddress = StartAddress + code_size;

            int prologue_end = reader.ReadLeb128 ();
            int epilogue_begin = reader.ReadLeb128 ();

            MethodStartAddress = prologue_end > 0 ?
                StartAddress + prologue_end : StartAddress;
            MethodEndAddress = epilogue_begin > 0 ?
                StartAddress + epilogue_begin : EndAddress;

            int num_line_numbers = reader.ReadLeb128 ();
            LineNumbers = new List<JitLineNumberEntry> ();

            for (int i = 0; i < num_line_numbers; i++) {
                int il_offset = reader.ReadSLeb128 ();
                int native_offset = reader.ReadSLeb128 ();

                if (il_offset < 0)
                    continue;

                LineNumbers.Add (new JitLineNumberEntry (il_offset, native_offset));
            }

            HasThis = reader.ReadByte () != 0;
            if (HasThis)
                ThisVariableInfo = new VariableInfo (arch, reader);

            int num_params = reader.ReadLeb128 ();
            ParamVariableInfo = new VariableInfo [num_params];
            for (int i = 0; i < num_params; i++)
                ParamVariableInfo [i] = new VariableInfo (arch, reader);

            int num_locals = reader.ReadLeb128 ();
            LocalVariableInfo = new VariableInfo [num_locals];
            for (int i = 0; i < num_locals; i++)
                LocalVariableInfo [i] = new VariableInfo (arch, reader);
        }
Пример #7
0
        public int CompareTo(object obj)
        {
            AddressDomain domain = (AddressDomain)obj;

            if (id < domain.id)
            {
                return(-1);
            }
            else if (id > domain.id)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Пример #8
0
            public void Load(TargetBinaryReader dynamic_reader, AddressDomain domain)
            {
                if (is_loaded)
                    throw new InternalError ();

                is_loaded = true;

                address = new MethodAddress (
                    dynamic_reader, domain, File.Architecture);

                SetAddresses (address.StartAddress, address.EndAddress);
                SetMethodBounds (address.MethodStartAddress, address.MethodEndAddress);
                SetLineNumbers (new WrapperLineNumberTable (this, address));
            }
Пример #9
0
            public void Load(TargetBinaryReader dynamic_reader, AddressDomain domain)
            {
                if (is_loaded)
                    throw new InternalError ();

                is_loaded = true;

                address = new MethodAddress (
                    dynamic_reader, domain, file.Architecture);

                SetAddresses (address.StartAddress, address.EndAddress);
                SetMethodBounds (address.MethodStartAddress, address.MethodEndAddress);

                SetLineNumbers (new MonoMethodLineNumberTable (
                    file, this, source, method, address.LineNumbers.ToArray ()));
            }
Пример #10
0
 protected TargetAddress ReadAddress(TargetBinaryReader reader, AddressDomain domain)
 {
     long address = reader.ReadAddress ();
     if (address != 0)
         return new TargetAddress (domain, address);
     else
         return TargetAddress.Null;
 }