コード例 #1
0
ファイル: Program.cs プロジェクト: viewizard/netcoredbg
        public static int?GetBreakpointId(string bpName, string bpPath = null)
        {
            Breakpoint bp = DebuggeeInfo.Breakpoints[bpName];

            Assert.Equal(BreakpointType.Line, bp.Type);
            var    lbp        = (LineBreakpoint)bp;
            string sourceFile = bpPath != null ? bpPath : lbp.FileName;

            List <SourceBreakpoint> listBp;

            if (!SrcBreakpoints.TryGetValue(sourceFile, out listBp))
            {
                throw new NetcoreDbgTestCore.ResultNotSuccessException();
            }

            List <int?> listBpId;

            if (!SrcBreakpointIds.TryGetValue(sourceFile, out listBpId))
            {
                throw new NetcoreDbgTestCore.ResultNotSuccessException();
            }

            int indexBp = listBp.FindIndex(x => x.line == lbp.NumLine);

            return(listBpId[indexBp]);
        }
コード例 #2
0
        public void AddBreakpoint(string caller_trace, string bpName, string bpPath = null, string Condition = null)
        {
            Breakpoint bp = ControlInfo.Breakpoints[bpName];

            Assert.Equal(BreakpointType.Line, bp.Type, @"__FILE__:__LINE__" + "\n" + caller_trace);
            var    lbp        = (LineBreakpoint)bp;
            string sourceFile = bpPath != null ? bpPath : lbp.FileName;

            List <SourceBreakpoint> listBp;

            if (!SrcBreakpoints.TryGetValue(sourceFile, out listBp))
            {
                listBp = new List <SourceBreakpoint>();
                SrcBreakpoints[sourceFile] = listBp;
            }
            listBp.Add(new SourceBreakpoint(lbp.NumLine, Condition));

            List <int?> listBpId;

            if (!SrcBreakpointIds.TryGetValue(sourceFile, out listBpId))
            {
                listBpId = new List <int?>();
                SrcBreakpointIds[sourceFile] = listBpId;
            }
            listBpId.Add(null);
        }
コード例 #3
0
        public int?GetBreakpointId(string caller_trace, string bpName, string bpPath = null)
        {
            Breakpoint bp = ControlInfo.Breakpoints[bpName];

            Assert.Equal(BreakpointType.Line, bp.Type, @"__FILE__:__LINE__" + "\n" + caller_trace);
            var    lbp        = (LineBreakpoint)bp;
            string sourceFile = bpPath != null ? bpPath : lbp.FileName;

            List <SourceBreakpoint> listBp;

            Assert.True(SrcBreakpoints.TryGetValue(sourceFile, out listBp), @"__FILE__:__LINE__" + "\n" + caller_trace);

            List <int?> listBpId;

            Assert.True(SrcBreakpointIds.TryGetValue(sourceFile, out listBpId), @"__FILE__:__LINE__" + "\n" + caller_trace);

            int indexBp = listBp.FindIndex(x => x.line == lbp.NumLine);

            return(listBpId[indexBp]);
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: mcumming/netcoredbg
        public void AddManualBreakpoint(string caller_trace, string bp_fileName, int bp_line)
        {
            List <SourceBreakpoint> listBp;

            if (!SrcBreakpoints.TryGetValue(bp_fileName, out listBp))
            {
                listBp = new List <SourceBreakpoint>();
                SrcBreakpoints[bp_fileName] = listBp;
            }
            listBp.Add(new SourceBreakpoint(bp_line, null));

            List <int?> listBpId;

            if (!SrcBreakpointIds.TryGetValue(bp_fileName, out listBpId))
            {
                listBpId = new List <int?>();
                SrcBreakpointIds[bp_fileName] = listBpId;
            }
            listBpId.Add(null);
        }