Inheritance: IDebugCodeContext2, IDebugCodeContext100
        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;
        }
Example #2
0
 int IDebugMemoryContext2.Add(ulong dwCount, out IDebugMemoryContext2 ppMemCxt) {
     ppMemCxt = new AD7MemoryAddress(Engine, FileName, LineNumber + (int)dwCount);
     return VSConstants.S_OK;
 }
Example #3
0
        int IDebugProgram2.EnumCodeContexts(IDebugDocumentPosition2 pDocPos, out IEnumDebugCodeContexts2 ppEnum) {
            ThrowIfDisposed();

            string fileName;
            Marshal.ThrowExceptionForHR(pDocPos.GetFileName(out fileName));

            var start = new TEXT_POSITION[1];
            var end = new TEXT_POSITION[1];
            Marshal.ThrowExceptionForHR(pDocPos.GetRange(start, end));

            var addr = new AD7MemoryAddress(this, fileName, (int)start[0].dwLine);
            ppEnum = new AD7CodeContextEnum(new[] { addr });
            return VSConstants.S_OK;
        }
Example #4
0
 int IDebugMemoryContext2.Add(ulong dwCount, out IDebugMemoryContext2 ppMemCxt)
 {
     ppMemCxt = new AD7MemoryAddress(Engine, FileName, LineNumber + (int)dwCount);
     return(VSConstants.S_OK);
 }
Example #5
0
 int IDebugStackFrame2.GetCodeContext(out IDebugCodeContext2 ppCodeCxt) {
     ppCodeCxt = new AD7MemoryAddress(this);
     return VSConstants.S_OK;
 }
Example #6
0
 public AD7DocumentContext(string fileName, TEXT_POSITION start, TEXT_POSITION end, AD7MemoryAddress address) {
     FileName = fileName;
     Start = start;
     End = end;
     Address = address;
 }
Example #7
0
 public AD7DocumentContext(string fileName, TEXT_POSITION start, TEXT_POSITION end, AD7MemoryAddress address)
 {
     FileName = fileName;
     Start    = start;
     End      = end;
     Address  = address;
 }
Example #8
0
 int IDebugStackFrame2.GetCodeContext(out IDebugCodeContext2 ppCodeCxt)
 {
     ppCodeCxt = new AD7MemoryAddress(this);
     return(VSConstants.S_OK);
 }