VirtualBox

Changeset 86749 in vbox for trunk/src


Ignore:
Timestamp:
Oct 28, 2020 9:04:02 PM (4 years ago)
Author:
vboxsync
Message:

VMM/DBGF: Implement L2 binary search tree node removal and make the all context breakpoint management code compile in ring-3, completely untested though, bugref:9837

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r86730 r86749  
    172172        VMMAll/CPUMAllMsrs.cpp \
    173173        VMMAll/DBGFAll.cpp \
     174        $(if-expr defined(VBOX_WITH_LOTS_OF_DBGF_BPS), VMMAll/DBGFAllBp.cpp,) \
    174175        $(if-expr defined(VBOX_WITH_DBGF_TRACING), VMMAll/DBGFAllTracer.cpp,) \
    175176        VMMAll/HMAll.cpp \
  • trunk/src/VBox/VMM/VMMAll/DBGFAllBp.cpp

    r86730 r86749  
    2929#include <iprt/assert.h>
    3030
     31#include "DBGFInline.h"
     32
    3133
    3234#ifdef IN_RC
     
    4042
    4143#ifdef VBOX_WITH_LOTS_OF_DBGF_BPS
    42 # ifdef IN_RING0
    4344/**
    4445 * Returns the internal breakpoint state for the given handle.
     
    5051 *                              on success, optional.
    5152 */
    52 DECLINLINE(PDBGFBPINT) dbgfR0BpGetByHnd(PVMCC pVM, DBGFBP hBp, PDBGFBPINTR0 *ppBpR0)
     53# ifdef IN_RING0
     54DECLINLINE(PDBGFBPINT) dbgfBpGetByHnd(PVMCC pVM, DBGFBP hBp, PDBGFBPINTR0 *ppBpR0)
     55# else
     56DECLINLINE(PDBGFBPINT) dbgfBpGetByHnd(PVMCC pVM, DBGFBP hBp)
     57# endif
    5358{
    5459    uint32_t idChunk  = DBGF_BP_HND_GET_CHUNK_ID(hBp);
     
    5863    AssertReturn(idxEntry < DBGF_BP_COUNT_PER_CHUNK, NULL);
    5964
     65# ifdef IN_RING0
    6066    PDBGFBPCHUNKR0 pBpChunk = &pVM->dbgfr0.s.aBpChunks[idChunk];
    61     AssertPtrReturn(pBpChunk->paBpBaseSharedR0, NULL);
     67    AssertPtrReturn(pBpChunk->CTX_SUFF(paBpBaseShared), NULL);
    6268
    6369    if (ppBpR0)
    6470        *ppBpR0 = &pBpChunk->paBpBaseR0Only[idxEntry];
    65     return &pBpChunk->paBpBaseSharedR0[idxEntry];
     71    return &pBpChunk->CTX_SUFF(paBpBaseShared)[idxEntry];
     72# elif defined(IN_RING3)
     73    PUVM pUVM = pVM->pUVM;
     74    PDBGFBPCHUNKR3 pBpChunk = &pUVM->dbgf.s.aBpChunks[idChunk];
     75    AssertPtrReturn(pBpChunk->CTX_SUFF(pBpBase), NULL);
     76
     77    return &pBpChunk->CTX_SUFF(pBpBase)[idxEntry];
     78# else
     79#  error "Unsupported host context"
     80# endif
     81}
     82
     83
     84/**
     85 * Returns the pointer to the L2 table entry from the given index.
     86 *
     87 * @returns Current context pointer to the L2 table entry or NULL if the provided index value is invalid.
     88 * @param   pVM         The cross context VM structure.
     89 * @param   idxL2       The L2 table index to resolve.
     90 *
     91 * @note The content of the resolved L2 table entry is not validated!.
     92 */
     93DECLINLINE(PCDBGFBPL2ENTRY) dbgfBpL2GetByIdx(PVMCC pVM, uint32_t idxL2)
     94{
     95    uint32_t idChunk  = DBGF_BP_L2_IDX_GET_CHUNK_ID(idxL2);
     96    uint32_t idxEntry = DBGF_BP_L2_IDX_GET_ENTRY(idxL2);
     97
     98    AssertReturn(idChunk < DBGF_BP_L2_TBL_CHUNK_COUNT, NULL);
     99    AssertReturn(idxEntry < DBGF_BP_L2_TBL_ENTRIES_PER_CHUNK, NULL);
     100
     101# ifdef IN_RING0
     102    PDBGFBPL2TBLCHUNKR0 pL2Chunk = &pVM->dbgfr0.s.aBpL2TblChunks[idChunk];
     103    AssertPtrReturn(pL2Chunk->CTX_SUFF(paBpL2TblBaseShared), NULL);
     104
     105    return &pL2Chunk->CTX_SUFF(paBpL2TblBaseShared)[idxEntry];
     106# elif defined(IN_RING3)
     107    PUVM pUVM = pVM->pUVM;
     108    PDBGFBPL2TBLCHUNKR3 pL2Chunk = &pUVM->dbgf.s.aBpL2TblChunks[idChunk];
     109    AssertPtrReturn(pL2Chunk->pbmAlloc, NULL);
     110    AssertReturn(ASMBitTest(pL2Chunk->pbmAlloc, idxEntry), NULL);
     111
     112    return &pL2Chunk->CTX_SUFF(pL2Base)[idxEntry];
     113# endif
    66114}
    67115
     
    78126 * @param   pBpR0       The ring-0 only breakpoint state.
    79127 */
    80 DECLINLINE(int) dbgfR0BpHit(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTXCORE pRegFrame,
    81                             DBGFBP hBp, PDBGFBPINT pBp, PDBGFBPINTR0 pBpR0)
     128# ifdef IN_RING0
     129DECLINLINE(int) dbgfBpHit(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTXCORE pRegFrame,
     130                          DBGFBP hBp, PDBGFBPINT pBp, PDBGFBPINTR0 pBpR0)
     131# else
     132DECLINLINE(int) dbgfBpHit(PVMCC pVM, PVMCPUCC pVCpu, PCPUMCTXCORE pRegFrame,
     133                          DBGFBP hBp, PDBGFBPINT pBp)
     134# endif
    82135{
    83136    uint64_t cHits = ASMAtomicIncU64(&pBp->Pub.cHits);
     
    85138
    86139    /** @todo Owner handling. */
    87     RT_NOREF(pVM, pRegFrame, pBpR0);
    88 
    89     LogFlow(("dbgfRZBpHit: hit breakpoint %u at %04x:%RGv cHits=0x%RX64\n",
     140    RT_NOREF(pVM, pRegFrame);
     141#ifdef IN_RING0
     142    RT_NOREF(pBpR0);
     143#endif
     144
     145    LogFlow(("dbgfBpHit: hit breakpoint %u at %04x:%RGv cHits=0x%RX64\n",
    90146             hBp, pRegFrame->cs.Sel, pRegFrame->rip, cHits));
    91147    return VINF_EM_DBG_BREAKPOINT;
    92 }
    93 
    94 
    95 /**
    96  * Returns the pointer to the L2 table entry from the given index.
    97  *
    98  * @returns Current context pointer to the L2 table entry or NULL if the provided index value is invalid.
    99  * @param   pVM         The cross context VM structure.
    100  * @param   idxL2       The L2 table index to resolve.
    101  *
    102  * @note The content of the resolved L2 table entry is not validated!.
    103  */
    104 DECLINLINE(PCDBGFBPL2ENTRY) dbgfR0BpL2GetByIdx(PVMCC pVM, uint32_t idxL2)
    105 {
    106     uint32_t idChunk  = DBGF_BP_L2_IDX_GET_CHUNK_ID(idxL2);
    107     uint32_t idxEntry = DBGF_BP_L2_IDX_GET_ENTRY(idxL2);
    108 
    109     AssertReturn(idChunk < DBGF_BP_L2_TBL_CHUNK_COUNT, NULL);
    110     AssertReturn(idxEntry < DBGF_BP_L2_TBL_ENTRIES_PER_CHUNK, NULL);
    111 
    112     PDBGFBPL2TBLCHUNKR0 pL2Chunk = &pVM->dbgfr0.s.aBpL2TblChunks[idChunk];
    113     AssertPtrReturn(pL2Chunk->paBpL2TblBaseSharedR0, NULL);
    114 
    115     return &pL2Chunk->CTX_SUFF(paBpL2TblBaseShared)[idxEntry];
    116148}
    117149
     
    132164    /** @todo We don't use the depth right now but abort the walking after a fixed amount of levels. */
    133165    uint8_t iDepth = 32;
    134     PCDBGFBPL2ENTRY pL2Entry = dbgfR0BpL2GetByIdx(pVM, idxL2Root);
     166    PCDBGFBPL2ENTRY pL2Entry = dbgfBpL2GetByIdx(pVM, idxL2Root);
    135167
    136168    while (RT_LIKELY(   iDepth-- > 0
     
    148180
    149181            /* Query the internal breakpoint state from the handle. */
     182# ifdef IN_RING0
    150183            PDBGFBPINTR0 pBpR0 = NULL;
    151             PDBGFBPINT pBp = dbgfR0BpGetByHnd(pVM, hBp, &pBpR0);
     184            PDBGFBPINT pBp = dbgfBpGetByHnd(pVM, hBp, &pBpR0);
     185# else
     186            PDBGFBPINT pBp = dbgfBpGetByHnd(pVM, hBp);
     187# endif
    152188            if (   pBp
    153189                && DBGF_BP_PUB_GET_TYPE(pBp->Pub.fFlagsAndType) == DBGFBPTYPE_INT3)
    154                 return dbgfR0BpHit(pVM, pVCpu, pRegFrame, hBp, pBp, pBpR0);
     190                return dbgfBpHit(pVM, pVCpu, pRegFrame, hBp, pBp
     191# ifdef IN_RING0
     192                                 , pBpR0
     193# endif
     194                                 );
    155195
    156196            /* The entry got corrupted, just abort. */
     
    166206            return VINF_EM_RAW_GUEST_TRAP;
    167207
    168         pL2Entry = dbgfR0BpL2GetByIdx(pVM, idxL2Next);
     208        pL2Entry = dbgfBpL2GetByIdx(pVM, idxL2Next);
    169209    }
    170210
    171211    return VERR_DBGF_BP_L2_LOOKUP_FAILED;
    172212}
    173 # endif /* !IN_RING0 */
    174213#endif /* !VBOX_WITH_LOTS_OF_DBGF_BPS */
    175214
     
    290329    }
    291330#else
    292 #ifndef IN_RING0
    293 # error "Todo"
    294 #endif
    295     if (pVM->dbgfr0.s.CTX_SUFF(paBpLocL1))
     331# if defined(IN_RING0)
     332    uint32_t volatile *paBpLocL1 = pVM->dbgfr0.s.CTX_SUFF(paBpLocL1);
     333# elif defined(IN_RING3)
     334    PUVM pUVM = pVM->pUVM;
     335    uint32_t volatile *paBpLocL1 = pUVM->dbgf.s.CTX_SUFF(paBpLocL1);
     336# else
     337#  error "Unsupported host context"
     338# endif
     339    if (paBpLocL1)
    296340    {
    297341        RTGCPTR GCPtrBp;
     
    302346
    303347        const uint16_t idxL1      = DBGF_BP_INT3_L1_IDX_EXTRACT_FROM_ADDR(GCPtrBp);
    304         const uint32_t u32L1Entry = ASMAtomicReadU32(&pVM->dbgfr0.s.CTX_SUFF(paBpLocL1)[idxL1]);
     348        const uint32_t u32L1Entry = ASMAtomicReadU32(&paBpLocL1[idxL1]);
    305349
    306350        LogFlowFunc(("GCPtrBp=%RGv idxL1=%u u32L1Entry=%#x\n", GCPtrBp, idxL1, u32L1Entry));
     
    314358
    315359                /* Query the internal breakpoint state from the handle. */
     360#ifdef IN_RING0
    316361                PDBGFBPINTR0 pBpR0 = NULL;
    317                 PDBGFBPINT pBp = dbgfR0BpGetByHnd(pVM, hBp, &pBpR0);
     362#endif
     363                PDBGFBPINT pBp = dbgfBpGetByHnd(pVM, hBp
     364#ifdef IN_RING0
     365                                                , &pBpR0
     366#endif
     367                                                );
    318368                if (   pBp
    319369                    && DBGF_BP_PUB_GET_TYPE(pBp->Pub.fFlagsAndType) == DBGFBPTYPE_INT3)
    320370                {
    321371                    if (pBp->Pub.u.Int3.GCPtr == (RTGCUINTPTR)GCPtrBp)
    322                         rc = dbgfR0BpHit(pVM, pVCpu, pRegFrame, hBp, pBp, pBpR0);
     372                        rc = dbgfBpHit(pVM, pVCpu, pRegFrame, hBp, pBp
     373#ifdef IN_RING0
     374                                       , pBpR0
     375#endif
     376                                       );
    323377                    /* else: Genuine guest trap. */
    324378                }
     
    333387        }
    334388        /* else: Genuine guest trap. */
     389
     390        return rc;
    335391    }
    336392#endif /* !VBOX_WITH_LOTS_OF_DBGF_BPS */
  • trunk/src/VBox/VMM/VMMR3/DBGFR3Bp.cpp

    r86728 r86749  
    944944static int dbgfR3BpInt2L2BstNodeInsert(PUVM pUVM, uint32_t idxL2Root, DBGFBP hBp, RTGCUINTPTR GCPtr)
    945945{
     946    GCPtr = DBGF_BP_INT3_L2_KEY_EXTRACT_FROM_ADDR(GCPtr);
     947
    946948    /* Allocate a new node first. */
    947949    uint32_t idxL2Nd = 0;
     
    10221024
    10231025/**
     1026 * Gets the leftmost from the given tree node start index.
     1027 *
     1028 * @returns VBox status code.
     1029 * @param   pUVM                The user mode VM handle.
     1030 * @param   idxL2Start          The start index to walk from.
     1031 * @param   pidxL2Leftmost      Where to store the L2 table index of the leftmost entry.
     1032 * @param   ppL2NdLeftmost      Where to store the pointer to the leftmost L2 table entry.
     1033 * @param   pidxL2NdLeftParent  Where to store the L2 table index of the leftmost entries parent.
     1034 * @param   ppL2NdLeftParent    Where to store the pointer to the leftmost L2 table entries parent.
     1035 */
     1036static int dbgfR33BpInt3BstGetLeftmostEntryFromNode(PUVM pUVM, uint32_t idxL2Start,
     1037                                                    uint32_t *pidxL2Leftmost, PDBGFBPL2ENTRY *ppL2NdLeftmost,
     1038                                                    uint32_t *pidxL2NdLeftParent, PDBGFBPL2ENTRY *ppL2NdLeftParent)
     1039{
     1040    uint32_t idxL2Parent = DBGF_BP_L2_ENTRY_IDX_END;
     1041    PDBGFBPL2ENTRY pL2NdParent = NULL;
     1042
     1043    for (;;)
     1044    {
     1045        PDBGFBPL2ENTRY pL2Entry = dbgfR3BpL2GetByIdx(pUVM, idxL2Start);
     1046        AssertPtr(pL2Entry);
     1047
     1048        uint32_t idxL2Left = DBGF_BP_L2_ENTRY_GET_IDX_LEFT(pL2Entry->u64LeftRightIdxDepthBpHnd2);
     1049        if (idxL2Start == DBGF_BP_L2_ENTRY_IDX_END)
     1050        {
     1051            *pidxL2Leftmost     = idxL2Start;
     1052            *ppL2NdLeftmost     = pL2Entry;
     1053            *pidxL2NdLeftParent = idxL2Parent;
     1054            *ppL2NdLeftParent   = pL2NdParent;
     1055            break;
     1056        }
     1057
     1058        idxL2Parent = idxL2Start;
     1059        idxL2Start  = idxL2Left;
     1060        pL2NdParent = pL2Entry;
     1061    }
     1062
     1063    return VINF_SUCCESS;
     1064}
     1065
     1066
     1067/**
     1068 * Removes the given node rearranging the tree.
     1069 *
     1070 * @returns VBox status code.
     1071 * @param   pUVM                The user mode VM handle.
     1072 * @param   idxL1               The index into the L1 table pointing to the binary search tree containing the node.
     1073 * @param   idxL2Root           The L2 table index where the tree root is located.
     1074 * @param   idxL2Nd             The node index to remove.
     1075 * @param   pL2Nd               The L2 table entry to remove.
     1076 * @param   idxL2NdParent       The parents index, can be DBGF_BP_L2_ENTRY_IDX_END if the root is about to be removed.
     1077 * @param   pL2NdParent         The parents L2 table entry, can be NULL if the root is about to be removed.
     1078 * @param   fLeftChild          Flag whether the node is the left child of the parent or the right one.
     1079 */
     1080static int dbgfR3BpInt3BstNodeRemove(PUVM pUVM, uint32_t idxL1, uint32_t idxL2Root,
     1081                                     uint32_t idxL2Nd, PDBGFBPL2ENTRY pL2Nd,
     1082                                     uint32_t idxL2NdParent, PDBGFBPL2ENTRY pL2NdParent,
     1083                                     bool fLeftChild)
     1084{
     1085    /*
     1086     * If there are only two nodes remaining the tree will get destroyed and the
     1087     * L1 entry will be converted to the direct handle type.
     1088     */
     1089    uint32_t idxL2Left  = DBGF_BP_L2_ENTRY_GET_IDX_LEFT(pL2Nd->u64LeftRightIdxDepthBpHnd2);
     1090    uint32_t idxL2Right = DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(pL2Nd->u64LeftRightIdxDepthBpHnd2);
     1091
     1092    Assert(idxL2NdParent != DBGF_BP_L2_ENTRY_IDX_END || !pL2NdParent);
     1093    uint32_t idxL2ParentNew = DBGF_BP_L2_ENTRY_IDX_END;
     1094    if (idxL2Right == DBGF_BP_L2_ENTRY_IDX_END)
     1095        idxL2ParentNew = idxL2Left;
     1096    else
     1097    {
     1098        /* Find the leftmost entry of the right subtree and move it to the to be removed nodes location in the tree. */
     1099        PDBGFBPL2ENTRY pL2NdLeftmostParent   = NULL;
     1100        PDBGFBPL2ENTRY pL2NdLeftmost         = NULL;
     1101        uint32_t idxL2NdLeftmostParent = DBGF_BP_L2_ENTRY_IDX_END;
     1102        uint32_t idxL2Leftmost = DBGF_BP_L2_ENTRY_IDX_END;
     1103        int rc = dbgfR33BpInt3BstGetLeftmostEntryFromNode(pUVM, idxL2Right, &idxL2Leftmost ,&pL2NdLeftmost,
     1104                                                          &idxL2NdLeftmostParent, &pL2NdLeftmostParent);
     1105        AssertRCReturn(rc, rc);
     1106
     1107        if (pL2NdLeftmostParent)
     1108        {
     1109            /* Rearrange the leftmost entries parents pointer. */
     1110            dbgfBpL2TblEntryUpdateLeft(pL2NdLeftmostParent, DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(pL2NdLeftmost->u64LeftRightIdxDepthBpHnd2), 0 /*iDepth*/);
     1111            dbgfBpL2TblEntryUpdateRight(pL2NdLeftmost, idxL2Right, 0 /*iDepth*/);
     1112        }
     1113
     1114        dbgfBpL2TblEntryUpdateLeft(pL2NdLeftmost, idxL2Left, 0 /*iDepth*/);
     1115
     1116        /* Update the remove nodes parent to point to the new node. */
     1117        idxL2ParentNew = idxL2Leftmost;
     1118    }
     1119
     1120    if (pL2NdParent)
     1121    {
     1122        /* Asssign the new L2 index to proper parents left or right pointer. */
     1123        if (fLeftChild)
     1124            dbgfBpL2TblEntryUpdateLeft(pL2NdParent, idxL2ParentNew, 0 /*iDepth*/);
     1125        else
     1126            dbgfBpL2TblEntryUpdateRight(pL2NdParent, idxL2ParentNew, 0 /*iDepth*/);
     1127    }
     1128    else
     1129    {
     1130        /* The root node is removed, set the new root in the L1 table. */
     1131        Assert(idxL2ParentNew != DBGF_BP_L2_ENTRY_IDX_END);
     1132        idxL2Root = idxL2ParentNew;
     1133        ASMAtomicXchgU32(&pUVM->dbgf.s.paBpLocL1R3[idxL1], DBGF_BP_INT3_L1_ENTRY_CREATE_L2_IDX(idxL2Left));
     1134    }
     1135
     1136    /* Free the node. */
     1137    dbgfR3BpL2TblEntryFree(pUVM, idxL2Nd, pL2Nd);
     1138
     1139    /*
     1140     * Check whether the old/new root is the only node remaining and convert the L1
     1141     * table entry to a direct breakpoint handle one in that case.
     1142     */
     1143    pL2Nd = dbgfR3BpL2GetByIdx(pUVM, idxL2Root);
     1144    AssertPtr(pL2Nd);
     1145    if (   DBGF_BP_L2_ENTRY_GET_IDX_LEFT(pL2Nd->u64LeftRightIdxDepthBpHnd2) == DBGF_BP_L2_ENTRY_IDX_END
     1146        && DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(pL2Nd->u64LeftRightIdxDepthBpHnd2) == DBGF_BP_L2_ENTRY_IDX_END)
     1147    {
     1148        DBGFBP hBp = DBGF_BP_L2_ENTRY_GET_BP_HND(pL2Nd->u64GCPtrKeyAndBpHnd1, pL2Nd->u64LeftRightIdxDepthBpHnd2);
     1149        dbgfR3BpL2TblEntryFree(pUVM, idxL2Root, pL2Nd);
     1150        ASMAtomicXchgU32(&pUVM->dbgf.s.paBpLocL1R3[idxL1], DBGF_BP_INT3_L1_ENTRY_CREATE_BP_HND(hBp));
     1151    }
     1152
     1153    return VINF_SUCCESS;
     1154}
     1155
     1156
     1157/**
    10241158 * Removes the given breakpoint handle keyed with the GC pointer from the L2 binary search tree
    10251159 * pointed to by the given L2 root index.
     
    10321166 * @param   GCPtr               The GC pointer the breakpoint is keyed with.
    10331167 */
    1034 static int dbgfR3BpInt2L2BstNodeRemove(PUVM pUVM, uint32_t idxL1, uint32_t idxL2Root, DBGFBP hBp, RTGCUINTPTR GCPtr)
    1035 {
     1168static int dbgfR3BpInt3L2BstRemove(PUVM pUVM, uint32_t idxL1, uint32_t idxL2Root, DBGFBP hBp, RTGCUINTPTR GCPtr)
     1169{
     1170    GCPtr = DBGF_BP_INT3_L2_KEY_EXTRACT_FROM_ADDR(GCPtr);
     1171
    10361172    int rc = RTSemFastMutexRequest(pUVM->dbgf.s.hMtxBpL2Wr); AssertRC(rc);
    10371173
    1038     RT_NOREF(idxL1, idxL2Root, hBp, GCPtr);
     1174    uint32_t idxL2Cur = idxL2Root;
     1175    uint32_t idxL2Parent = DBGF_BP_L2_ENTRY_IDX_END;
     1176    bool fLeftChild = false;
     1177    PDBGFBPL2ENTRY pL2EntryParent = NULL;
     1178    for (;;)
     1179    {
     1180        PDBGFBPL2ENTRY pL2Entry = dbgfR3BpL2GetByIdx(pUVM, idxL2Cur);
     1181        AssertPtr(pL2Entry);
     1182
     1183        /* Check whether this node is to be removed.. */
     1184        RTGCUINTPTR GCPtrL2Entry = DBGF_BP_L2_ENTRY_GET_GCPTR(pL2Entry->u64GCPtrKeyAndBpHnd1);
     1185        if (GCPtrL2Entry == GCPtr)
     1186        {
     1187            Assert(DBGF_BP_L2_ENTRY_GET_BP_HND(pL2Entry->u64GCPtrKeyAndBpHnd1, pL2Entry->u64LeftRightIdxDepthBpHnd2) == hBp);
     1188
     1189            rc = dbgfR3BpInt3BstNodeRemove(pUVM, idxL1, idxL2Root, idxL2Cur, pL2Entry,
     1190                                           idxL2Parent, pL2EntryParent, fLeftChild);
     1191            break;
     1192        }
     1193
     1194        pL2EntryParent = pL2Entry;
     1195        idxL2Parent    = idxL2Cur;
     1196
     1197        if (GCPtrL2Entry < GCPtr)
     1198        {
     1199            fLeftChild = true;
     1200            idxL2Cur = DBGF_BP_L2_ENTRY_GET_IDX_LEFT(pL2Entry->u64LeftRightIdxDepthBpHnd2);
     1201        }
     1202        else
     1203        {
     1204            fLeftChild = false;
     1205            idxL2Cur = DBGF_BP_L2_ENTRY_GET_IDX_RIGHT(pL2Entry->u64LeftRightIdxDepthBpHnd2);
     1206        }
     1207
     1208        AssertBreakStmt(idxL2Cur != DBGF_BP_L2_ENTRY_IDX_END, rc = VERR_DBGF_BP_L2_LOOKUP_FAILED);
     1209    }
    10391210
    10401211    int rc2 = RTSemFastMutexRelease(pUVM->dbgf.s.hMtxBpL2Wr); AssertRC(rc2);
     
    11321303                AssertReturn(DBGF_BP_INT3_L1_ENTRY_GET_TYPE(u32Entry) == DBGF_BP_INT3_L1_ENTRY_TYPE_L2_IDX, VERR_DBGF_BP_IPE_9);
    11331304
    1134                 rc = dbgfR3BpInt2L2BstNodeRemove(pUVM, idxL1, DBGF_BP_INT3_L1_ENTRY_GET_L2_IDX(u32Entry),
    1135                                                  hBp, pBp->Pub.u.Int3.GCPtr);
     1305                rc = dbgfR3BpInt3L2BstRemove(pUVM, idxL1, DBGF_BP_INT3_L1_ENTRY_GET_L2_IDX(u32Entry),
     1306                                             hBp, pBp->Pub.u.Int3.GCPtr);
    11361307            }
    11371308        }
    11381309        else if (u8Type == DBGF_BP_INT3_L1_ENTRY_TYPE_L2_IDX)
    1139             rc = dbgfR3BpInt2L2BstNodeRemove(pUVM, idxL1, DBGF_BP_INT3_L1_ENTRY_GET_L2_IDX(u32Entry),
    1140                                              hBp, pBp->Pub.u.Int3.GCPtr);
     1310            rc = dbgfR3BpInt3L2BstRemove(pUVM, idxL1, DBGF_BP_INT3_L1_ENTRY_GET_L2_IDX(u32Entry),
     1311                                         hBp, pBp->Pub.u.Int3.GCPtr);
    11411312    }
    11421313
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette