Lines Matching refs:pBp

45 static int dbgfR3BpRegArm(PVM pVM, PDBGFBP pBp);
46 static int dbgfR3BpInt3Arm(PUVM pUVM, PDBGFBP pBp);
156 PDBGFBP pBp;
158 pBp = &pVM->dbgf.s.aHwBreakpoints[iBp];
164 pBp = &pVM->dbgf.s.aBreakpoints[iBp];
168 switch (pBp->enmType)
179 AssertMsgFailed(("Invalid enmType=%d!\n", pBp->enmType));
183 return pBp;
239 * @param pBp The breakpoint to free.
241 static void dbgfR3BpFree(PVM pVM, PDBGFBP pBp)
243 switch (pBp->enmType)
261 AssertMsgFailed(("Invalid enmType=%d!\n", pBp->enmType));
265 pBp->enmType = DBGFBPTYPE_FREE;
301 PDBGFBP pBp = dbgfR3BpGetByAddr(pVM, DBGFBPTYPE_INT3, pAddress->FlatPtr);
302 if (pBp)
305 if (!pBp->fEnabled)
306 rc = dbgfR3BpInt3Arm(pUVM, pBp);
311 *piBp = pBp->iBp;
319 pBp = dbgfR3BpAlloc(pVM, DBGFBPTYPE_INT3);
320 if (!pBp)
322 pBp->GCPtr = pAddress->FlatPtr;
323 pBp->iHitTrigger = *piHitTrigger;
324 pBp->iHitDisable = *piHitDisable;
325 pBp->fEnabled = true;
330 int rc = dbgfR3BpInt3Arm(pUVM, pBp);
334 *piBp = pBp->iBp;
337 dbgfR3BpFree(pVM, pBp);
375 * @param pBp The breakpoint.
377 static int dbgfR3BpInt3Arm(PUVM pUVM, PDBGFBP pBp)
388 DBGFR3AddrFromFlat(pUVM, &Addr, pBp->GCPtr);
389 int rc = DBGFR3MemRead(pUVM, idCpu, &Addr, &pBp->u.Int3.bOrg, 1);
405 * @param pBp The breakpoint.
407 static int dbgfR3BpInt3Disarm(PUVM pUVM, PDBGFBP pBp)
417 DBGFR3AddrFromFlat(pUVM, &Addr, pBp->GCPtr);
421 rc = DBGFR3MemWrite(pUVM, idCpu, &Addr, &pBp->u.Int3.bOrg, 1);
487 PDBGFBP pBp = dbgfR3BpGetByAddr(pVM, DBGFBPTYPE_REG, pAddress->FlatPtr);
488 if ( pBp
489 && pBp->u.Reg.cb == cb
490 && pBp->u.Reg.fType == fType)
493 if (!pBp->fEnabled)
494 rc = dbgfR3BpRegArm(pVM, pBp);
499 *piBp = pBp->iBp;
507 pBp = dbgfR3BpAlloc(pVM, DBGFBPTYPE_REG);
508 if (!pBp)
510 pBp->GCPtr = pAddress->FlatPtr;
511 pBp->iHitTrigger = *piHitTrigger;
512 pBp->iHitDisable = *piHitDisable;
513 pBp->fEnabled = true;
514 Assert(pBp->iBp == pBp->u.Reg.iReg);
515 pBp->u.Reg.fType = fType;
516 pBp->u.Reg.cb = cb;
521 int rc = dbgfR3BpRegArm(pVM, pBp);
525 *piBp = pBp->iBp;
528 dbgfR3BpFree(pVM, pBp);
578 * @param pBp The breakpoint.
580 static int dbgfR3BpRegArm(PVM pVM, PDBGFBP pBp)
582 Assert(pBp->fEnabled);
593 * @param pBp The breakpoint.
595 static int dbgfR3BpRegDisarm(PVM pVM, PDBGFBP pBp)
597 Assert(!pBp->fEnabled);
636 PDBGFBP pBp = dbgfR3BpGetByAddr(pVM, DBGFBPTYPE_REM, pAddress->FlatPtr);
637 if (pBp)
640 if (!pBp->fEnabled)
642 rc = REMR3BreakpointSet(pVM, pBp->GCPtr);
644 rc = IEMBreakpointSet(pVM, pBp->GCPtr);
650 *piBp = pBp->iBp;
658 pBp = dbgfR3BpAlloc(pVM, DBGFBPTYPE_REM);
659 if (!pBp)
661 pBp->GCPtr = pAddress->FlatPtr;
662 pBp->iHitTrigger = *piHitTrigger;
663 pBp->iHitDisable = *piHitDisable;
664 pBp->fEnabled = true;
677 *piBp = pBp->iBp;
680 dbgfR3BpFree(pVM, pBp);
727 PDBGFBP pBp = dbgfR3BpGet(pVM, iBp);
728 if (!pBp)
734 if (pBp->fEnabled)
736 pBp->fEnabled = false;
738 switch (pBp->enmType)
741 rc = dbgfR3BpRegDisarm(pVM, pBp);
745 rc = dbgfR3BpInt3Disarm(pUVM, pBp);
750 rc = REMR3BreakpointClear(pVM, pBp->GCPtr);
752 rc = IEMBreakpointClear(pVM, pBp->GCPtr);
757 AssertMsgFailedReturn(("Invalid enmType=%d!\n", pBp->enmType), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
765 dbgfR3BpFree(pVM, pBp);
805 PDBGFBP pBp = dbgfR3BpGet(pVM, iBp);
806 if (!pBp)
812 if (pBp->fEnabled)
819 pBp->fEnabled = true;
820 switch (pBp->enmType)
823 rc = dbgfR3BpRegArm(pVM, pBp);
827 rc = dbgfR3BpInt3Arm(pUVM, pBp);
832 rc = REMR3BreakpointSet(pVM, pBp->GCPtr);
834 rc = IEMBreakpointSet(pVM, pBp->GCPtr);
839 AssertMsgFailedReturn(("Invalid enmType=%d!\n", pBp->enmType), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
842 pBp->fEnabled = false;
883 PDBGFBP pBp = dbgfR3BpGet(pVM, iBp);
884 if (!pBp)
890 if (!pBp->fEnabled)
896 pBp->fEnabled = false;
898 switch (pBp->enmType)
901 rc = dbgfR3BpRegDisarm(pVM, pBp);
905 rc = dbgfR3BpInt3Disarm(pUVM, pBp);
910 rc = REMR3BreakpointClear(pVM, pBp->GCPtr);
912 rc = IEMBreakpointClear(pVM, pBp->GCPtr);
917 AssertMsgFailedReturn(("Invalid enmType=%d!\n", pBp->enmType), VERR_IPE_NOT_REACHED_DEFAULT_CASE);