VirtualBox

Ignore:
Timestamp:
Jun 4, 2012 12:10:19 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78337
Message:

DBGC: Made the parse cope with functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGCOps.cpp

    r41553 r41561  
    152152*******************************************************************************/
    153153/** Operators. */
    154 const DBGCOP g_aOps[] =
     154const DBGCOP g_aDbgcOps[] =
    155155{
    156156    /* szName is initialized as a 4 char array because of M$C elsewise optimizing it away in /Ox mode (the 'const char' vs 'char' problem). */
     
    185185
    186186/** Number of operators in the operator array. */
    187 const unsigned g_cOps = RT_ELEMENTS(g_aOps);
     187const uint32_t g_cDbgcOps = RT_ELEMENTS(g_aDbgcOps);
    188188
    189189
     
    14001400{
    14011401    PCDBGCOP    pOp = NULL;
    1402     for (unsigned iOp = 0; iOp < RT_ELEMENTS(g_aOps); iOp++)
    1403     {
    1404         if (     g_aOps[iOp].szName[0] == pszExpr[0]
    1405             &&  (!g_aOps[iOp].szName[1] || g_aOps[iOp].szName[1] == pszExpr[1])
    1406             &&  (!g_aOps[iOp].szName[2] || g_aOps[iOp].szName[2] == pszExpr[2]))
     1402    for (unsigned iOp = 0; iOp < RT_ELEMENTS(g_aDbgcOps); iOp++)
     1403    {
     1404        if (     g_aDbgcOps[iOp].szName[0] == pszExpr[0]
     1405            &&  (!g_aDbgcOps[iOp].szName[1] || g_aDbgcOps[iOp].szName[1] == pszExpr[1])
     1406            &&  (!g_aDbgcOps[iOp].szName[2] || g_aDbgcOps[iOp].szName[2] == pszExpr[2]))
    14071407        {
    14081408            /*
     
    14101410             */
    14111411            unsigned j;
    1412             for (j = iOp + 1; j < RT_ELEMENTS(g_aOps); j++)
    1413                 if (    g_aOps[j].cchName > g_aOps[iOp].cchName
    1414                     &&  g_aOps[j].szName[0] == pszExpr[0]
    1415                     &&  (!g_aOps[j].szName[1] || g_aOps[j].szName[1] == pszExpr[1])
    1416                     &&  (!g_aOps[j].szName[2] || g_aOps[j].szName[2] == pszExpr[2]) )
     1412            for (j = iOp + 1; j < RT_ELEMENTS(g_aDbgcOps); j++)
     1413                if (    g_aDbgcOps[j].cchName > g_aDbgcOps[iOp].cchName
     1414                    &&  g_aDbgcOps[j].szName[0] == pszExpr[0]
     1415                    &&  (!g_aDbgcOps[j].szName[1] || g_aDbgcOps[j].szName[1] == pszExpr[1])
     1416                    &&  (!g_aDbgcOps[j].szName[2] || g_aDbgcOps[j].szName[2] == pszExpr[2]) )
    14171417                    break;
    1418             if (j < RT_ELEMENTS(g_aOps))
     1418            if (j < RT_ELEMENTS(g_aDbgcOps))
    14191419                continue;       /* we'll catch it later. (for theoretical +,++,+++ cases.) */
    1420             pOp = &g_aOps[iOp];
     1420            pOp = &g_aDbgcOps[iOp];
    14211421
    14221422            /*
    14231423             * Preferred type?
    14241424             */
    1425             if (g_aOps[iOp].fBinary == fPreferBinary)
     1425            if (g_aDbgcOps[iOp].fBinary == fPreferBinary)
    14261426                break;
    14271427        }
Note: See TracChangeset for help on using the changeset viewer.

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