Changeset 92729 in vbox
- Timestamp:
- Dec 3, 2021 9:19:21 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/VMM/VMMR3/DBGFR3Bp.cpp (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/DBGFR3Bp.cpp
r92727 r92729 1136 1136 1137 1137 /* The L1 entry has changed due to another thread racing us during insertion, free nodes and try again. */ 1138 dbgfR3BpL2TblEntryFree(pUVM, idxL2Leaf, pL2Leaf); 1138 1139 rc = VINF_TRY_AGAIN; 1139 dbgfR3BpL2TblEntryFree(pUVM, idxL2Leaf, pL2Leaf);1140 1140 } 1141 1141 … … 1172 1172 /* Make a copy of the entry. */ 1173 1173 DBGFBPL2ENTRY L2Entry; 1174 L2Entry.u64GCPtrKeyAndBpHnd1 = ASMAtomicReadU64( (volatile uint64_t *)&pL2Entry->u64GCPtrKeyAndBpHnd1);1175 L2Entry.u64LeftRightIdxDepthBpHnd2 = ASMAtomicReadU64( (volatile uint64_t *)&pL2Entry->u64LeftRightIdxDepthBpHnd2);1174 L2Entry.u64GCPtrKeyAndBpHnd1 = ASMAtomicReadU64(&pL2Entry->u64GCPtrKeyAndBpHnd1); 1175 L2Entry.u64LeftRightIdxDepthBpHnd2 = ASMAtomicReadU64(&pL2Entry->u64LeftRightIdxDepthBpHnd2); 1176 1176 1177 1177 RTGCUINTPTR GCPtrL2Entry = DBGF_BP_L2_ENTRY_GET_GCPTR(L2Entry.u64GCPtrKeyAndBpHnd1); … … 1179 1179 1180 1180 /* Not found, get to the next level. */ 1181 uint32_t idxL2Next = (GCPtr < GCPtrL2Entry)1182 ? DBGF_BP_L2_ENTRY_GET_IDX_LEFT(L2Entry.u64LeftRightIdxDepthBpHnd2)1183 : DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(L2Entry.u64LeftRightIdxDepthBpHnd2);1181 uint32_t idxL2Next = GCPtr < GCPtrL2Entry 1182 ? DBGF_BP_L2_ENTRY_GET_IDX_LEFT(L2Entry.u64LeftRightIdxDepthBpHnd2) 1183 : DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(L2Entry.u64LeftRightIdxDepthBpHnd2); 1184 1184 if (idxL2Next == DBGF_BP_L2_ENTRY_IDX_END) 1185 1185 { … … 1196 1196 } 1197 1197 1198 dbgfR3BpL2TblEntryFree(pUVM, idxL2Nd, pL2Nd); 1198 1199 rc = VERR_DBGF_BP_L2_LOOKUP_FAILED; 1199 dbgfR3BpL2TblEntryFree(pUVM, idxL2Nd, pL2Nd);1200 1200 } 1201 1201 … … 1401 1401 Assert(DBGF_BP_L2_ENTRY_GET_BP_HND(pL2Entry->u64GCPtrKeyAndBpHnd1, pL2Entry->u64LeftRightIdxDepthBpHnd2) == hBp); RT_NOREF(hBp); 1402 1402 1403 rc = dbgfR3BpInt3BstNodeRemove(pUVM, idxL1, idxL2Root, idxL2Cur, pL2Entry, 1404 idxL2Parent, pL2EntryParent, fLeftChild); 1403 rc = dbgfR3BpInt3BstNodeRemove(pUVM, idxL1, idxL2Root, idxL2Cur, pL2Entry, idxL2Parent, pL2EntryParent, fLeftChild); 1405 1404 break; 1406 1405 } … … 1541 1540 } 1542 1541 } 1543 1544 1542 break; 1545 1543 } … … 1572 1570 1573 1571 /* Not found, get to the next level. */ 1574 uint32_t idxL2Next = (GCPtrKey < GCPtrL2Entry)1575 ? DBGF_BP_L2_ENTRY_GET_IDX_LEFT(pL2Nd->u64LeftRightIdxDepthBpHnd2)1576 : DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(pL2Nd->u64LeftRightIdxDepthBpHnd2);1572 uint32_t idxL2Next = GCPtrKey < GCPtrL2Entry 1573 ? DBGF_BP_L2_ENTRY_GET_IDX_LEFT(pL2Nd->u64LeftRightIdxDepthBpHnd2) 1574 : DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(pL2Nd->u64LeftRightIdxDepthBpHnd2); 1577 1575 /* Address not found if the entry denotes the end. */ 1578 1576 if (idxL2Next == DBGF_BP_L2_ENTRY_IDX_END) … … 1593 1591 if ( hBp != NIL_DBGFBP 1594 1592 && ppBp) 1595 *ppBp = dbgfR3BpGetByHnd(pUVM, hBp);1593 *ppBp = dbgfR3BpGetByHnd(pUVM, hBp); 1596 1594 return hBp; 1597 1595 } … … 1801 1799 static int dbgfR3BpArm(PUVM pUVM, DBGFBP hBp, PDBGFBPINT pBp) 1802 1800 { 1803 int rc = VINF_SUCCESS;1801 int rc; 1804 1802 PVM pVM = pUVM->pVM; 1805 1803 … … 1855 1853 ASMAtomicIncU32(&pUVM->dbgf.s.cPortIoBps); 1856 1854 IOMR3NotifyBreakpointCountChange(pVM, true /*fPortIo*/, false /*fMmio*/); 1855 rc = VINF_SUCCESS; 1857 1856 break; 1858 1857 } … … 1881 1880 static int dbgfR3BpDisarm(PUVM pUVM, DBGFBP hBp, PDBGFBPINT pBp) 1882 1881 { 1883 int rc = VINF_SUCCESS;1882 int rc; 1884 1883 PVM pVM = pUVM->pVM; 1885 1884 … … 1930 1929 if (!cPortIoBps) /** @todo Need to gather all EMTs to not have a stray EMT accessing BP data when it might go away. */ 1931 1930 IOMR3NotifyBreakpointCountChange(pVM, false /*fPortIo*/, false /*fMmio*/); 1931 rc = VINF_SUCCESS; 1932 1932 break; 1933 1933 } … … 1977 1977 /* Replace the int3 with the original instruction byte. */ 1978 1978 abInstr[0] = pBp->Pub.u.Int3.bOrg; 1979 rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(&pVCpu->cpum.GstCtx), GCPtrInstr, &abInstr[0], sizeof(abInstr)); 1979 rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(&pVCpu->cpum.GstCtx), GCPtrInstr, 1980 &abInstr[0], sizeof(abInstr)); 1980 1981 if ( rcStrict == VINF_SUCCESS 1981 1982 && DBGF_BP_PUB_IS_EXEC_AFTER(&pBp->Pub)) 1982 1983 { 1983 VBOXSTRICTRC rcStrict2 = pBpOwner->pfnBpHitR3(pVM, pVCpu->idCpu, pBp->pvUserR3, hBp, &pBp->Pub, DBGF_BP_F_HIT_EXEC_AFTER); 1984 VBOXSTRICTRC rcStrict2 = pBpOwner->pfnBpHitR3(pVM, pVCpu->idCpu, pBp->pvUserR3, hBp, &pBp->Pub, 1985 DBGF_BP_F_HIT_EXEC_AFTER); 1984 1986 if (rcStrict2 == VINF_SUCCESS) 1985 1987 return VBOXSTRICTRC_VAL(rcStrict); 1986 elseif (rcStrict2 != VINF_DBGF_BP_HALT)1988 if (rcStrict2 != VINF_DBGF_BP_HALT) 1987 1989 return VERR_DBGF_BP_OWNER_CALLBACK_WRONG_STATUS; 1988 1990 } … … 2752 2754 return VINF_SUCCESS; 2753 2755 } 2754 elseif (VBOXSTRICTRC_VAL(rcStrict) != VINF_DBGF_BP_HALT) /* Guru meditation. */2756 if (VBOXSTRICTRC_VAL(rcStrict) != VINF_DBGF_BP_HALT) /* Guru meditation. */ 2755 2757 return VERR_DBGF_BP_OWNER_CALLBACK_WRONG_STATUS; 2756 2758 /* else: Halt in the debugger. */
Note:
See TracChangeset
for help on using the changeset viewer.

