int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if (dwFields.HasFlag(enum_BPRESI_FIELDS.BPRESI_PROGRAM)) { pBPResolutionInfo[0].pProgram = Engine; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } if (dwFields.HasFlag(enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION)) { string fileName; int lineNumber; TEXT_POSITION start, end; BoundBreakpoint.PendingBreakpoint.GetLocation(out fileName, out lineNumber, out start, out end); var addr = new AD7MemoryAddress(Engine, fileName, lineNumber); addr.DocumentContext = new AD7DocumentContext(fileName, start, end, addr); var location = new BP_RESOLUTION_LOCATION { bpType = (uint)enum_BP_TYPE.BPT_CODE, unionmember1 = Marshal.GetComInterfaceForObject(addr, typeof(IDebugCodeContext2)) }; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } return(VSConstants.S_OK); }
// Gets the breakpoint resolution information that describes this breakpoint. int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { // The sample engine only supports code breakpoints. BP_RESOLUTION_LOCATION location = new BP_RESOLUTION_LOCATION(); location.bpType = (uint)enum_BP_TYPE.BPT_CODE; // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. AD7MemoryAddress codeContext = new AD7MemoryAddress(m_engine, m_address.Filename, (uint)m_address.LineNo); codeContext.SetDocumentContext(m_documentContext); location.unionmember1 = Marshal.GetComInterfaceForObject(codeContext, typeof(IDebugCodeContext2)); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].pProgram = (IDebugProgram2)m_engine; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return(VSConstants.S_OK); }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { var info = new BP_RESOLUTION_INFO(); info.pProgram = program; info.dwFields = enum_BPRESI_FIELDS.BPRESI_PROGRAM; if (Thread != null) { info.pThread = Thread; info.dwFields |= enum_BPRESI_FIELDS.BPRESI_THREAD; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0 && locationBP != null) { info.bpResLocation.bpType = (uint)enum_BP_TYPE.BPT_CODE; var codeContext = new DebugCodeContext(locationBP.Location); var docLoc = locationBP.DocumentLocation; if (docLoc != null) { codeContext.DocumentContext = new DebugDocumentContext(docLoc, codeContext); } // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. info.bpResLocation.unionmember1 = Marshal.GetComInterfaceForObject(codeContext, typeof(IDebugCodeContext2)); info.dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } pBPResolutionInfo[0] = info; return(VSConstants.S_OK); }
// Gets the breakpoint resolution information that describes this breakpoint. int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { // The sample engine only supports code breakpoints. BP_RESOLUTION_LOCATION location = new BP_RESOLUTION_LOCATION(); location.bpType = (uint)enum_BP_TYPE.BPT_CODE; // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. AD7MemoryAddress codeContext = new AD7MemoryAddress(m_engine, m_address); codeContext.SetDocumentContext(m_documentContext); location.unionmember1 = Marshal.GetComInterfaceForObject(codeContext, typeof(IDebugCodeContext2)); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].pProgram = (IDebugProgram2)m_engine; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return Constants.S_OK; }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if (pBPResolutionInfo == null) throw new ArgumentNullException("pBPResolutionInfo"); if (pBPResolutionInfo.Length == 0) throw new ArgumentException(); pBPResolutionInfo[0].dwFields = 0; if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; pBPResolutionInfo[0].pProgram = _program; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_THREAD) != 0 && _thread != null) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_THREAD; pBPResolutionInfo[0].pThread = _thread; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0 && false) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; _location.ToNativeForm(out pBPResolutionInfo[0].bpResLocation); } return VSConstants.S_OK; }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int GetResolutionInfo(enum_BPRESI_FIELDS requestedFields, BP_RESOLUTION_INFO [] resolutionInfo) { // // Gets the breakpoint resolution information that describes this breakpoint. // LoggingUtils.PrintFunction(); try { resolutionInfo [0] = new BP_RESOLUTION_INFO(); if ((requestedFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { enum_BP_TYPE bpType; GetBreakpointType(out bpType); if (bpType == enum_BP_TYPE.BPT_CODE) { resolutionInfo [0].bpResLocation.bpType = (uint)bpType; resolutionInfo [0].bpResLocation.unionmember1 = Marshal.GetComInterfaceForObject(m_codeContext, typeof(IDebugCodeContext2)); } else if (bpType == enum_BP_TYPE.BPT_DATA) { resolutionInfo [0].bpResLocation.bpType = (uint)bpType; throw new NotImplementedException(); } resolutionInfo [0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } if ((requestedFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { LoggingUtils.RequireOk(m_codeContext.GetProgram(out resolutionInfo [0].pProgram)); resolutionInfo [0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } if ((requestedFields & enum_BPRESI_FIELDS.BPRESI_THREAD) != 0) { } return(Constants.S_OK); } catch (NotImplementedException e) { LoggingUtils.HandleException(e); return(Constants.E_NOTIMPL); } catch (Exception e) { LoggingUtils.HandleException(e); return(Constants.E_FAIL); } }
// Gets the breakpoint resolution information that describes this breakpoint. int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { BP_RESOLUTION_LOCATION location = new BP_RESOLUTION_LOCATION(); location.bpType = (uint)_breakType; if (_breakType == enum_BP_TYPE.BPT_CODE) { // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. AD7MemoryAddress codeContext = new AD7MemoryAddress(_engine, Addr, _functionName); codeContext.SetDocumentContext(_documentContext); location.unionmember1 = HostMarshal.RegisterCodeContext(codeContext); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } else if (_breakType == enum_BP_TYPE.BPT_DATA) { location.unionmember1 = HostMarshal.GetIntPtrForDataBreakpointAddress(EngineUtils.AsAddr(Addr, _engine.DebuggedProcess.Is64BitArch)); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].pProgram = (IDebugProgram2)_engine; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return(Constants.S_OK); }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if (pBPResolutionInfo == null) { throw new ArgumentNullException("pBPResolutionInfo"); } if (pBPResolutionInfo.Length == 0) { throw new ArgumentException(); } pBPResolutionInfo[0].dwFields = 0; if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; pBPResolutionInfo[0].pProgram = _program; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_THREAD) != 0 && _thread != null) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_THREAD; pBPResolutionInfo[0].pThread = _thread; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0 && false) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; _location.ToNativeForm(out pBPResolutionInfo[0].bpResLocation); } return(VSConstants.S_OK); }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { var info = new BP_RESOLUTION_INFO(); info.pProgram = program; info.dwFields = enum_BPRESI_FIELDS.BPRESI_PROGRAM; if (Thread != null) { info.pThread = Thread; info.dwFields |= enum_BPRESI_FIELDS.BPRESI_THREAD; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0 && locationBP != null) { info.bpResLocation.bpType = (uint)enum_BP_TYPE.BPT_CODE; var codeContext = new DebugCodeContext(locationBP.Location); var docLoc = locationBP.DocumentLocation; if(docLoc != null) codeContext.DocumentContext = new DebugDocumentContext(docLoc, codeContext); // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. info.bpResLocation.unionmember1 = Marshal.GetComInterfaceForObject(codeContext, typeof(IDebugCodeContext2)); info.dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } pBPResolutionInfo[0] = info; return VSConstants.S_OK; }
// Gets the breakpoint resolution information that describes this breakpoint. int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { BP_RESOLUTION_LOCATION location = new BP_RESOLUTION_LOCATION(); location.bpType = (uint)_breakType; if (_breakType == enum_BP_TYPE.BPT_CODE) { // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. AD7MemoryAddress codeContext = new AD7MemoryAddress(_engine, Addr, _functionName); codeContext.SetDocumentContext(_documentContext); location.unionmember1 = HostMarshal.RegisterCodeContext(codeContext); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } else if (_breakType == enum_BP_TYPE.BPT_DATA) { location.unionmember1 = HostMarshal.GetIntPtrForDataBreakpointAddress(EngineUtils.AsAddr(Addr, _engine.DebuggedProcess.Is64BitArch)); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].pProgram = (IDebugProgram2)_engine; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return Constants.S_OK; }
int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if (dwFields.HasFlag(enum_BPRESI_FIELDS.BPRESI_PROGRAM)) { pBPResolutionInfo[0].pProgram = Engine; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } if (dwFields.HasFlag(enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION)) { string fileName; int lineNumber; TEXT_POSITION start, end; BoundBreakpoint.PendingBreakpoint.GetLocation(out fileName, out lineNumber, out start, out end); var addr = new AD7MemoryAddress(Engine, fileName, lineNumber); addr.DocumentContext = new AD7DocumentContext(fileName, start, end, addr); var location = new BP_RESOLUTION_LOCATION { bpType = (uint)enum_BP_TYPE.BPT_CODE, unionmember1 = Marshal.GetComInterfaceForObject(addr, typeof(IDebugCodeContext2)) }; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } return VSConstants.S_OK; }
// Token: 0x06000040 RID: 64 RVA: 0x00002F85 File Offset: 0x00001185 public int GetResolutionInfo(enum_BPRESI_FIELDS fields, BP_RESOLUTION_INFO[] info) { if ((fields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { info[0].pProgram = this.Process; info[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return(0); }
public void GetResolutionInfo() { enum_BPRESI_FIELDS fields = enum_BPRESI_FIELDS.BPRESI_ALLFIELDS; BP_RESOLUTION_INFO[] resolutionInfos = new BP_RESOLUTION_INFO[1]; Assert.AreEqual(VSConstants.S_OK, breakpointResolution.GetResolutionInfo(fields, resolutionInfos)); Assert.AreEqual(expectedResolutionInfo, resolutionInfos[0]); }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if (dwFields == enum_BPRESI_FIELDS.BPRESI_ALLFIELDS) { pBPResolutionInfo[0].dwFields = enum_BPRESI_FIELDS.BPRESI_PROGRAM; pBPResolutionInfo[0].pProgram = _engine; } return(VSConstants.S_OK); }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if (dwFields == enum_BPRESI_FIELDS.BPRESI_ALLFIELDS) { pBPResolutionInfo[0].dwFields = enum_BPRESI_FIELDS.BPRESI_PROGRAM; pBPResolutionInfo[0].pProgram = _engine; } return VSConstants.S_OK; }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] resolutionInfos) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { resolutionInfos[0].bpResLocation = _location; resolutionInfos[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0 && _program != null) { resolutionInfos[0].pProgram = _program; resolutionInfos[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return(VSConstants.S_OK); }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { var info = new BP_RESOLUTION_INFO(); info.pProgram = program; info.dwFields = enum_BPRESI_FIELDS.BPRESI_PROGRAM; if (Thread != null) { info.pThread = Thread; info.dwFields |= enum_BPRESI_FIELDS.BPRESI_THREAD; } pBPResolutionInfo[0] = info; return VSConstants.S_OK; }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { var info = new BP_RESOLUTION_INFO(); info.pProgram = program; info.dwFields = enum_BPRESI_FIELDS.BPRESI_PROGRAM; if (Thread != null) { info.pThread = Thread; info.dwFields |= enum_BPRESI_FIELDS.BPRESI_THREAD; } pBPResolutionInfo[0] = info; return(VSConstants.S_OK); }
public int GetResolutionInfo(enum_BPRESI_FIELDS fields, BP_RESOLUTION_INFO[] resolutionInfo) { if ((fields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { // The sample engine only supports code breakpoints. var location = new BP_RESOLUTION_LOCATION(); location.bpType = (uint)enum_BP_TYPE.BPT_CODE; // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. MonoMemoryAddress codeContext = new MonoMemoryAddress(engine, address, documentContext); location.unionmember1 = Marshal.GetComInterfaceForObject(codeContext, typeof(IDebugCodeContext2)); resolutionInfo[0].bpResLocation = location; resolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } return(VSConstants.S_OK); }
int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; pBPResolutionInfo[0].bpResLocation = new BP_RESOLUTION_LOCATION { bpType = (uint)enum_BP_TYPE.BPT_CODE, // Taken from the engine sample unionmember1 = Marshal.GetComInterfaceForObject(SourceContext, typeof(IDebugCodeContext2)) }; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; pBPResolutionInfo[0].pProgram = _program; } 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); }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { //VS line\column is zero based. PowerShell is 1 var documentContext = new ScriptDocumentContext(File, Line - 1, Column, ""); Log.Debug("ScriptBreakpoint: GetResolutionInfo"); 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) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { BP_RESOLUTION_LOCATION location = new BP_RESOLUTION_LOCATION(); location.bpType = (uint)enum_BP_TYPE.BPT_CODE; location.unionmember1 = Marshal.GetComInterfaceForObject(CodeContext, typeof(IDebugCodeContext2)); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].pProgram = Program as IDebugProgram2; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return(VSConstants.S_OK); }
int IDebugBreakpointResolution2.GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { if ((dwFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { BP_RESOLUTION_LOCATION location = new BP_RESOLUTION_LOCATION(); location.bpType = (uint)enum_BP_TYPE.BPT_CODE; // the engine only supports code breakpoints // The debugger will not QI the IDebugCodeContex2 interface returned here. We must pass the pointer // to IDebugCodeContex2 and not IUnknown. location.unionmember1 = Marshal.GetComInterfaceForObject(_context, typeof(IDebugCodeContext2)); pBPResolutionInfo[0].bpResLocation = location; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } if ((dwFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { pBPResolutionInfo[0].pProgram = _program; pBPResolutionInfo[0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } return(VSConstants.S_OK); }
/// <summary> /// Gets the breakpoint resolution information that describes this breakpoint. /// </summary> /// <param name="dwFields">A combination of flags from the BPRESI_FIELDS enumeration that determine which fields of the pBPResolutionInfo parameter are to be filled out.</param> /// <param name="pBPResolutionInfo">The BP_RESOLUTION_INFO structure to be filled in with information about this breakpoint.</param> /// <returns>If successful, returns S_OK; otherwise returns an error code.</returns> public virtual int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { Logger.Debug(string.Empty); return(VSConstants.E_NOTIMPL); }
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; }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int GetResolutionInfo (enum_BPRESI_FIELDS requestedFields, BP_RESOLUTION_INFO [] resolutionInfo) { // // Gets the breakpoint resolution information that describes this breakpoint. // LoggingUtils.PrintFunction (); try { resolutionInfo [0] = new BP_RESOLUTION_INFO (); if ((requestedFields & enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION) != 0) { enum_BP_TYPE bpType; GetBreakpointType (out bpType); if (bpType == enum_BP_TYPE.BPT_CODE) { resolutionInfo [0].bpResLocation.bpType = (uint)bpType; resolutionInfo [0].bpResLocation.unionmember1 = Marshal.GetComInterfaceForObject (m_codeContext, typeof (IDebugCodeContext2)); } else if (bpType == enum_BP_TYPE.BPT_DATA) { resolutionInfo [0].bpResLocation.bpType = (uint)bpType; throw new NotImplementedException (); } resolutionInfo [0].dwFields |= enum_BPRESI_FIELDS.BPRESI_BPRESLOCATION; } if ((requestedFields & enum_BPRESI_FIELDS.BPRESI_PROGRAM) != 0) { LoggingUtils.RequireOk (m_codeContext.GetProgram (out resolutionInfo [0].pProgram)); resolutionInfo [0].dwFields |= enum_BPRESI_FIELDS.BPRESI_PROGRAM; } if ((requestedFields & enum_BPRESI_FIELDS.BPRESI_THREAD) != 0) { } return Constants.S_OK; } catch (NotImplementedException e) { LoggingUtils.HandleException (e); return Constants.E_NOTIMPL; } catch (Exception e) { LoggingUtils.HandleException (e); return Constants.E_FAIL; } }
/// <summary> /// Gets the breakpoint resolution information that describes this breakpoint. /// </summary> /// <param name="dwFields">A combination of flags from the BPRESI_FIELDS enumeration that determine which fields of the pBPResolutionInfo parameter are to be filled out.</param> /// <param name="pBPResolutionInfo">The BP_RESOLUTION_INFO structure to be filled in with information about this breakpoint.</param> /// <returns>If successful, returns S_OK; otherwise returns an error code.</returns> public virtual int GetResolutionInfo( enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo ) { Logger.Debug( string.Empty ); return VSConstants.E_NOTIMPL; }
public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo) { //VS line\column is zero based. PowerShell is 1 var documentContext = new ScriptDocumentContext(File, Line - 1, Column, ""); Log.Debug("ScriptBreakpoint: GetResolutionInfo"); 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; }