Пример #1
0
        public bool AddRangeEntry(int blockId, int sline, int scol, int eline, int ecol, string src)
        {
            ProtoCore.CodeModel.CodeRange range = new ProtoCore.CodeModel.CodeRange()
            {
                StartInclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo = sline,
                    CharNo = scol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src }
                },

                EndExclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo = eline,
                    CharNo = ecol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src }
                }
            };

            KeyValuePair<int, ProtoCore.CodeModel.CodeRange> entry =
                new KeyValuePair<int, ProtoCore.CodeModel.CodeRange>(blockId, range);

            RangeTable.Add(entry);
            if (!FunctionTable.ContainsKey(blockId))
                FunctionTable[blockId] = new FunctionRangeTable();
            return true;
        }
Пример #2
0
        private void InitializeDebugInfo(int line, int col, int eline, int ecol, string file)
        {
            nextStep = new List <int>();

            CodeModel.CodeFile sourceLocation = new CodeModel.CodeFile {
                FilePath = file
            };
            ProtoCore.CodeModel.CodeRange range = new CodeModel.CodeRange
            {
                StartInclusive = new CodeModel.CodePoint
                {
                    LineNo         = line,
                    CharNo         = col,
                    SourceLocation = sourceLocation
                },

                EndExclusive = new CodeModel.CodePoint
                {
                    LineNo         = eline,
                    CharNo         = ecol,
                    SourceLocation = sourceLocation
                }
            };

            Location = range;
        }
Пример #3
0
        public bool AddRangeEntry(int blockId, int sline, int scol, int eline, int ecol, string src)
        {
            ProtoCore.CodeModel.CodeRange range = new ProtoCore.CodeModel.CodeRange()
            {
                StartInclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo         = sline,
                    CharNo         = scol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile {
                        FilePath = src
                    }
                },

                EndExclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo         = eline,
                    CharNo         = ecol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile {
                        FilePath = src
                    }
                }
            };

            KeyValuePair <int, ProtoCore.CodeModel.CodeRange> entry =
                new KeyValuePair <int, ProtoCore.CodeModel.CodeRange>(blockId, range);

            RangeTable.Add(entry);
            if (!FunctionTable.ContainsKey(blockId))
            {
                FunctionTable[blockId] = new FunctionRangeTable();
            }
            return(true);
        }
Пример #4
0
        public bool AddEntry(int functionIndex, int sline, int scol, int eline, int ecol, string src)
        {
            if (RangeTable.ContainsKey(functionIndex))
            {
                return(false);
            }

            ProtoCore.CodeModel.CodeRange range = new ProtoCore.CodeModel.CodeRange()
            {
                StartInclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo         = sline,
                    CharNo         = scol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile {
                        FilePath = src
                    }
                },

                EndExclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo         = eline,
                    CharNo         = ecol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile {
                        FilePath = src
                    }
                }
            };

            RangeTable[functionIndex] = range;
            return(true);
        }
Пример #5
0
 public Breakpoint(DebugInfo di, string sourceLocation = null)
 {
     Location = di.Location;
 }
Пример #6
0
 public Breakpoint(DebugInfo di, string sourceLocation = null)
 {
     Location = di.Location;
 }
Пример #7
0
        public bool AddEntry(int functionIndex, int sline, int scol, int eline, int ecol, string src)
        {
            if (RangeTable.ContainsKey(functionIndex))
                return false;

            ProtoCore.CodeModel.CodeRange range = new ProtoCore.CodeModel.CodeRange()
            {
                StartInclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo = sline,
                    CharNo = scol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src }
                },

                EndExclusive = new ProtoCore.CodeModel.CodePoint
                {
                    LineNo = eline,
                    CharNo = ecol,
                    SourceLocation = new ProtoCore.CodeModel.CodeFile { FilePath = src }
                }
            };

            RangeTable[functionIndex] = range;
            return true;
        }
Пример #8
0
        private void InitializeDebugInfo(int line, int col, int eline, int ecol, string file)
        {
            nextStep = new List<int>();

            CodeModel.CodeFile sourceLocation = new CodeModel.CodeFile { FilePath = file };
            ProtoCore.CodeModel.CodeRange range = new CodeModel.CodeRange
            {
                StartInclusive = new CodeModel.CodePoint
                {
                    LineNo = line,
                    CharNo = col,
                    SourceLocation = sourceLocation
                },

                EndExclusive = new CodeModel.CodePoint
                {
                    LineNo = eline,
                    CharNo = ecol,
                    SourceLocation = sourceLocation
                }
            };

            Location = range;
        }