public MonoBoundBreakpoint(MonoEngine engine, uint address, MonoPendingBreakpoint pendingBreakpoint, MonoBreakpointResolution breakpointResolution) { this.engine = engine; this.address = address; this.pendingBreakpoint = pendingBreakpoint; this.breakpointResolution = breakpointResolution; }
public int Bind() { var docPosition = (IDebugDocumentPosition2)Marshal.GetObjectForIUnknown(requestInfo.bpLocation.unionmember2); string documentName; EngineUtils.CheckOk(docPosition.GetFileName(out documentName)); // Remap document name TODO: Implement this properly const string localRoot = @"C:/dev/TestDebug/TestDebug"; documentName = documentName.Replace('\\', '/'); const string remoteRoot = @"/mnt/c/dev/TestDebug/TestDebug"; documentName = remoteRoot + documentName.Substring(localRoot.Length); var startPosition = new TEXT_POSITION[1]; var endPosition = new TEXT_POSITION[1]; EngineUtils.CheckOk(docPosition.GetRange(startPosition, endPosition)); var engine = breakpointManager.Engine; breakpoint = engine.Session.Breakpoints.Add(documentName, (int)startPosition[0].dwLine + 1, (int)startPosition[0].dwColumn + 1); breakpointManager.Add(breakpoint, this); SetCondition(requestInfo.bpCondition); SetPassCount(requestInfo.bpPassCount); lock (boundBreakpoints) { uint address = 0; var breakpointResolution = new MonoBreakpointResolution(engine, address, GetDocumentContext(address)); var boundBreakpoint = new MonoBoundBreakpoint(engine, address, this, breakpointResolution); boundBreakpoints.Add(boundBreakpoint); engine.Send(new MonoBreakpointBoundEvent(this, boundBreakpoint), MonoBreakpointBoundEvent.IID, null); } return(VSConstants.S_OK); }
public int GetBreakpointResolution(out IDebugBreakpointResolution2 breakpointResolution) { breakpointResolution = this.breakpointResolution; return(VSConstants.S_OK); }