| 3829 | } |
| 3830 | |
| 3831 | void WinDebugger::DetachBreakpoint(Breakpoint* breakpoint) |
| 3832 | { |
| 3833 | AutoCrit autoCrit(mDebugManager->mCritSect); |
| 3834 | |
| 3835 | BfLogDbg("WinDebugger::DetachBreakpoint %p\n", breakpoint); |
| 3836 | |
| 3837 | WdBreakpoint* wdBreakpoint = (WdBreakpoint*)breakpoint; |
| 3838 | |
| 3839 | if (wdBreakpoint->mAddr != 0) |
| 3840 | { |
| 3841 | mBreakpointAddrMap.Remove(wdBreakpoint->mAddr, wdBreakpoint); |
| 3842 | RemoveBreakpoint(wdBreakpoint->mAddr); |
| 3843 | if ((mDebuggerWaitingThread != NULL) && (mDebuggerWaitingThread->mIsAtBreakpointAddress == wdBreakpoint->mAddr)) |
| 3844 | mDebuggerWaitingThread->mIsAtBreakpointAddress = NULL; |
| 3845 | if ((mDebuggerWaitingThread != NULL) && (mDebuggerWaitingThread->mBreakpointAddressContinuing == wdBreakpoint->mAddr)) |
| 3846 | mDebuggerWaitingThread->mBreakpointAddressContinuing = NULL; |
| 3847 | wdBreakpoint->mLineData = DbgLineDataEx(); |
| 3848 | wdBreakpoint->mAddr = 0; |
| 3849 | } |
| 3850 | |
| 3851 | if (wdBreakpoint->mCondition != NULL) |
| 3852 | { |
| 3853 | delete wdBreakpoint->mCondition->mDbgEvaluationContext; |
| 3854 | wdBreakpoint->mCondition->mDbgEvaluationContext = NULL; |
| 3855 | } |
| 3856 | |
| 3857 | if (wdBreakpoint->mMemoryBreakpointInfo != NULL) |
| 3858 | { |
| 3859 | for (int memoryWatchSlot = 0; memoryWatchSlot < 4; memoryWatchSlot++) |
| 3860 | { |
| 3861 | if (mMemoryBreakpoints[memoryWatchSlot].mBreakpoint == wdBreakpoint) |
| 3862 | { |
| 3863 | mFreeMemoryBreakIndices.push_back(memoryWatchSlot); |
| 3864 | mMemoryBreakpoints[memoryWatchSlot] = WdMemoryBreakpointBind(); |
| 3865 | mMemoryBreakpointVersion++; |
| 3866 | UpdateThreadDebugRegisters(); |
| 3867 | } |
| 3868 | } |
| 3869 | |
| 3870 | wdBreakpoint->mMemoryBreakpointInfo->mMemoryWatchSlotBitmap = 0; |
| 3871 | } |
| 3872 | |
| 3873 | if (wdBreakpoint->mLinkedSibling != NULL) |
| 3874 | { |
| 3875 | DeleteBreakpoint(wdBreakpoint->mLinkedSibling); |
| 3876 | wdBreakpoint->mLinkedSibling = NULL; |
| 3877 | } |
| 3878 | |
| 3879 | wdBreakpoint->mSrcFile = NULL; |
| 3880 | wdBreakpoint->mPendingHotBindIdx = -1; |
| 3881 | } |
| 3882 | |
| 3883 | void WinDebugger::MoveBreakpoint(Breakpoint* breakpoint, int lineNum, int wantColumn, bool rebindNow) |
| 3884 | { |
nothing calls this directly
no test coverage detected