// 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); }
// 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(_engine, Addr, _functionName); codeContext.SetDocumentContext(_documentContext); location.unionmember1 = HostMarshal.RegisterCodeContext(codeContext); 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); }