private void SetASMBreakpoint(UInt32 aAddress) { if (GetASMBreakpointInfoFromASMAddress(aAddress) == null) { bool set = false; for (int xID = 0; xID < BreakpointManager.MaxBP; xID++) { if (mEngine.BPMgr.mActiveBPs[xID] == null) { UInt32 CSBPAddress = mDebugInfoDb.GetClosestCSharpBPAddress(aAddress); ASMBreakpoints.Add(new Tuple <UInt32, UInt32, int>(CSBPAddress, aAddress, xID)); mEngine.BPMgr.mActiveBPs[xID] = new AD7BoundBreakpoint(CSBPAddress); var label = mDebugInfoDb.GetLabels(CSBPAddress)[0]; INT3sSet.Add(new KeyValuePair <uint, string>(CSBPAddress, label)); mDbgConnector.SetBreakpoint(xID, CSBPAddress); set = true; break; } } if (!set) { throw new Exception("Maximum number of active breakpoints exceeded (" + BreakpointManager.MaxBP + ")."); } } }
// Creates an entry and remotely enables the breakpoint in the debug stub public int RemoteEnable(AD7BoundBreakpoint aBBP) { for (int xID = 0; xID < MaxBP; xID++) { if (mActiveBPs[xID] == null) { mActiveBPs[xID] = aBBP; var label = mEngine.mProcess.mDebugInfoDb.GetLabels(aBBP.mAddress)[0]; mEngine.mProcess.INT3sSet.Add(new KeyValuePair <uint, string>(aBBP.mAddress, label)); mDbgConnector.SetBreakpoint(xID, aBBP.mAddress); return(xID); } } throw new Exception("Maximum number of active breakpoints exceeded (" + MaxBP + ")."); }