VirtualBox

Changeset 450 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 30, 2007 11:06:24 PM (18 years ago)
Author:
vboxsync
Message:

Don't use an offset based AVL tree for symbols.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/DBGFInternal.h

    r23 r450  
    222222    RTCRITSECT              InfoCritSect;
    223223
    224 
     224    /** Range tree containing the loaded symbols of the a VM.
     225     * This tree will never have blind spots. */
     226    HCPTRTYPE(AVLRGCPTRTREE) SymbolTree;
     227    /** Symbol name space. */
     228    HCPTRTYPE(PRTSTRSPACE)  pSymbolSpace;
    225229    /** Indicates whether DBGFSym.cpp is initialized or not.
    226230     * This part is initialized in a lazy manner for performance reasons. */
    227231    bool                    fSymInited;
    228     /** Range tree containing the loaded symbols of the a VM.
    229      * This tree will never have blind spots. */
    230     AVLROGCPTRTREE          SymbolTree;
    231     /** Symbol name space. */
    232     HCPTRTYPE(PRTSTRSPACE)  pSymbolSpace;
     232    /** Alignment padding. */
     233    RTUINT                  uAlignment0;
    233234
    234235    /** The number of hardware breakpoints. */
  • trunk/src/VBox/VMM/DBGFSym.cpp

    r23 r450  
    7474{
    7575    /** Node core with the symbol address range. */
    76     AVLROGCPTRNODECORE      Core;
     76    AVLRGCPTRNODECORE       Core;
    7777    /** Pointer to the module this symbol is associated with. */
    7878    PDBGFMOD                pModule;
     
    116116        pSym->pModule = NULL;
    117117        pSym->szName[0] = '\0';
    118         if (RTAvlroGCPtrInsert(&pVM->dbgf.s.SymbolTree, &pSym->Core))
     118        if (RTAvlrGCPtrInsert(&pVM->dbgf.s.SymbolTree, &pSym->Core))
    119119            return VINF_SUCCESS;
    120120        AssertReleaseMsgFailed(("Failed to insert %VGv-%VGv!\n", pSym->Core.Key, pSym->Core.KeyLast));
     
    142142        memcpy(pSym->szName, pszName, cchName);
    143143
    144         PDBGFSYM pOld = (PDBGFSYM)RTAvlroGCPtrRangeGet(&pVM->dbgf.s.SymbolTree, (RTGCPTR)Address);
     144        PDBGFSYM pOld = (PDBGFSYM)RTAvlrGCPtrRangeGet(&pVM->dbgf.s.SymbolTree, (RTGCPTR)Address);
    145145        if (pOld)
    146146        {
     
    148148            if (pOld->Core.Key == pSym->Core.Key)
    149149            {
    150                 pOld = (PDBGFSYM)RTAvlroGCPtrRemove(&pVM->dbgf.s.SymbolTree, (RTGCPTR)Address);
     150                pOld = (PDBGFSYM)RTAvlrGCPtrRemove(&pVM->dbgf.s.SymbolTree, (RTGCPTR)Address);
    151151                AssertRelease(pOld);
    152152                MMR3HeapFree(pOld);
     
    154154            else
    155155                pOld->Core.KeyLast = Address - 1;
    156             if (RTAvlroGCPtrInsert(&pVM->dbgf.s.SymbolTree, &pSym->Core))
     156            if (RTAvlrGCPtrInsert(&pVM->dbgf.s.SymbolTree, &pSym->Core))
    157157            {
    158158                /*
     
    199199static PDBGFSYM dbgfR3SymbolGetAddr(PVM pVM, RTGCPTR Address)
    200200{
    201     PDBGFSYM pSym = (PDBGFSYM)RTAvlroGCPtrRangeGet(&pVM->dbgf.s.SymbolTree, Address);
     201    PDBGFSYM pSym = (PDBGFSYM)RTAvlrGCPtrRangeGet(&pVM->dbgf.s.SymbolTree, Address);
    202202    Assert(pSym);
    203203    if (pSym && pSym->szName[0])
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