public AD7StackFrame(AD7ProgramNode node, RoutineScope rs) { Debug.WriteLine("AD7StackFrame: ctor"); _rs = rs; _node = node; //Breakpoint bp = DebuggerManager.Instance.CurrentBreakpoint.CoreBreakpoint; Breakpoint bp = rs.CurrentPosition; TEXT_POSITION pos = new TEXT_POSITION() { dwLine = (uint)(bp.StartLine - 1), dwColumn = ( uint )(bp.StartColumn) }; TEXT_POSITION endPos = new TEXT_POSITION(); endPos.dwLine = ( uint )(bp.EndLine - 1); endPos.dwColumn = ( uint )(bp.EndColumn); _docContext = new AD7DocumentContext(_rs.GetFileName(), -1, pos, endPos, rs); _node.FileName = _node.Debugger.Debugger.CurrentScope.FileName; }
int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { Debug.WriteLine("AD7Breakpoint: GetResolutionInfo"); AD7DocumentContext documentContext = new AD7DocumentContext(_node.FileName, ( int )_lineNumber, _beginPosition, _endPosition, this._node.Debugger.Debugger.CurrentScope); if (dwFields == enum_BPRESI_FIELDS.BPRESI_ALLFIELDS) { var loc = new BP_RESOLUTION_LOCATION { bpType = (uint)enum_BP_TYPE.BPT_CODE, unionmember1 = Marshal.GetComInterfaceForObject(documentContext, typeof(IDebugCodeContext2)) }; pBPResolutionInfo[0].bpResLocation = loc; pBPResolutionInfo[0].pProgram = _node; pBPResolutionInfo[0].pThread = _node; } return(VSConstants.S_OK); }
int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { Debug.WriteLine("AD7Breakpoint: GetResolutionInfo"); AD7DocumentContext documentContext = new AD7DocumentContext(_node.FileName, ( int )_lineNumber, _beginPosition, _endPosition, this._node.Debugger.Debugger.CurrentScope ); if (dwFields == enum_BPRESI_FIELDS.BPRESI_ALLFIELDS) { var loc = new BP_RESOLUTION_LOCATION { bpType = (uint)enum_BP_TYPE.BPT_CODE, unionmember1 = Marshal.GetComInterfaceForObject(documentContext, typeof(IDebugCodeContext2)) }; pBPResolutionInfo[0].bpResLocation = loc; pBPResolutionInfo[0].pProgram = _node; pBPResolutionInfo[0].pThread = _node; } return VSConstants.S_OK; }