コード例 #1
0
        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);
        }
コード例 #2
0
        // 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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: AD7BreakpointResolution.cs プロジェクト: jda808/NPL
        // 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;
        }
コード例 #5
0
        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;
        }
コード例 #6
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        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);
            }
        }
コード例 #7
0
        // 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);
        }
コード例 #8
0
        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);
        }
コード例 #9
0
        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;
        }
コード例 #10
0
        // 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;
        }
コード例 #11
0
        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;
        }
コード例 #12
0
 // 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);
 }
コード例 #13
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]);
        }
コード例 #14
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);
        }
コード例 #15
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;
        }
コード例 #16
0
 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);
 }
コード例 #17
0
        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;
        }
コード例 #18
0
        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);
        }
コード例 #19
0
        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);
        }
コード例 #20
0
ファイル: Breakpoint.cs プロジェクト: vsrad/radeon-asm-tools
        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);
        }
コード例 #21
0
ファイル: AD7Breakpoint.cs プロジェクト: lauxjpn/mysql-for-vs
        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);
        }
コード例 #22
0
        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);
        }
コード例 #23
0
        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);
        }
コード例 #24
0
        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);
        }
コード例 #25
0
ファイル: Breakpoint.cs プロジェクト: modulexcite/PowerStudio
 /// <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);
 }
コード例 #26
0
    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;
    }
コード例 #27
0
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    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;
      }
    }
コード例 #28
0
ファイル: Breakpoint.cs プロジェクト: IntelliTect/PowerStudio
 /// <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;
 }
コード例 #29
0
        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;
        }