Mono.Debugger.Backend.DwarfReader.LineNumberEngine.LineNumberEngine C# (CSharp) Method

LineNumberEngine() public method

public LineNumberEngine ( DieCompileUnit comp_unit, long offset, string compilation_dir ) : System
comp_unit DieCompileUnit
offset long
compilation_dir string
return System
            public LineNumberEngine(DieCompileUnit comp_unit, long offset,
						 string compilation_dir)
            {
                this.comp_unit = comp_unit;
                this.offset = offset;
                this.reader = comp_unit.dwarf.DebugLineReader;
                this.compilation_dir = compilation_dir;

                debug ("NEW LNE: {0}", offset);

                reader.Position = offset;
                length = reader.ReadInitialLength ();
                end_offset = reader.Position + length;
                version = reader.ReadInt16 ();
                header_length = reader.ReadOffset ();
                data_offset = reader.Position + header_length;
                minimum_insn_length = reader.ReadByte ();
                default_is_stmt = reader.ReadByte () != 0;
                line_base = (sbyte) reader.ReadByte ();
                line_range = reader.ReadByte ();
                opcode_base = reader.ReadByte ();
                standard_opcode_lengths = new int [opcode_base - 1];
                for (int i = 0; i < opcode_base - 1; i++)
                    standard_opcode_lengths [i] = reader.ReadByte ();
                include_dirs = new ArrayList ();
                while (reader.PeekByte () != 0)
                    include_dirs.Add (reader.ReadString ());
                reader.Position++;
                source_files = new ArrayList ();
                while (reader.PeekByte () != 0)
                    source_files.Add (new FileEntry (this, reader));
                reader.Position++;

                const_add_pc_range = ((0xff - opcode_base) / line_range) *
                    minimum_insn_length;

                debug ("NEW LNE #1: {0} {1} - {2} {3} {4}",
                       reader.Position, offset, length,
                       data_offset, end_offset);

                lines = new ArrayList ();

                stm = new StatementMachine (this, data_offset, end_offset);
                Read ();

                lines.Sort ();
                addresses = new LineNumber [lines.Count];
                lines.CopyTo (addresses, 0);
            }