Mono.Debugger.TargetBinaryReader.ReadLeb128 C# (CSharp) Méthode

ReadLeb128() public méthode

public ReadLeb128 ( ) : int
Résultat int
        public int ReadLeb128()
        {
            int size;
            int retval = PeekLeb128 (pos, out size);
            pos += size;
            return retval;
        }

Usage Example

        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);
        }
All Usage Examples Of Mono.Debugger.TargetBinaryReader::ReadLeb128