VirtualBox

Changeset 64559 in vbox for trunk


Ignore:
Timestamp:
Nov 4, 2016 11:27:37 AM (8 years ago)
Author:
vboxsync
Message:

Rename DBGFR3Cfg* to DBGFR3Flow* to avoid confusing with APIs for configuring

Location:
trunk
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/dbgf.h

    r64557 r64559  
    24882488
    24892489
    2490 /** @defgroup grp_dbgf_cfg       The DBGF control flow graph Interface.
     2490/** @defgroup grp_dbgf_flow       The DBGF control flow graph Interface.
    24912491 * @{
    24922492 */
    24932493
    24942494/** A DBGF control flow graph handle. */
    2495 typedef struct DBGFCFGINT *DBGFCFG;
     2495typedef struct DBGFFLOWINT *DBGFFLOW;
    24962496/** Pointer to a DBGF control flow graph handle. */
    2497 typedef DBGFCFG *PDBGFCFG;
     2497typedef DBGFFLOW *PDBGFFLOW;
    24982498/** A DBGF control flow graph basic block handle. */
    2499 typedef struct DBGFCFGBBINT *DBGFCFGBB;
     2499typedef struct DBGFFLOWBBINT *DBGFFLOWBB;
    25002500/** Pointer to a DBGF control flow graph basic block handle. */
    2501 typedef DBGFCFGBB *PDBGFCFGBB;
     2501typedef DBGFFLOWBB *PDBGFFLOWBB;
    25022502/** A DBGF control flow graph iterator. */
    2503 typedef struct DBGFCFGITINT *DBGFCFGIT;
     2503typedef struct DBGFFLOWITINT *DBGFFLOWIT;
    25042504/** Pointer to a control flow graph iterator. */
    2505 typedef DBGFCFGIT *PDBGFCFGIT;
    2506 
    2507 /** @name DBGFCFGBB Flags.
     2505typedef DBGFFLOWIT *PDBGFFLOWIT;
     2506
     2507/** @name DBGFFLOWBB Flags.
    25082508 * @{ */
    25092509/** The basic block is the entry into the owning control flow graph. */
    2510 #define DBGF_CFG_BB_F_ENTRY             RT_BIT_32(0)
     2510#define DBGF_FLOW_BB_F_ENTRY             RT_BIT_32(0)
    25112511/** The basic block was not populated because the limit was reached. */
    2512 #define DBGF_CFG_BB_F_EMPTY             RT_BIT_32(1)
     2512#define DBGF_FLOW_BB_F_EMPTY             RT_BIT_32(1)
    25132513/** The basic block is not complete because an error happened during disassembly. */
    2514 #define DBGF_CFG_BB_F_INCOMPLETE_ERR    RT_BIT_32(2)
     2514#define DBGF_FLOW_BB_F_INCOMPLETE_ERR    RT_BIT_32(2)
    25152515/** @} */
    25162516
     
    25182518 * DBGF control graph basic block end type.
    25192519 */
    2520 typedef enum DBGFCFGBBENDTYPE
     2520typedef enum DBGFFLOWBBENDTYPE
    25212521{
    25222522    /** Invalid type. */
    2523     DBGFCFGBBENDTYPE_INVALID = 0,
     2523    DBGFFLOWBBENDTYPE_INVALID = 0,
    25242524    /** Basic block is the exit block and has no successor. */
    2525     DBGFCFGBBENDTYPE_EXIT,
     2525    DBGFFLOWBBENDTYPE_EXIT,
    25262526    /** Basic block is the last disassembled block because the
    25272527     * maximum amount to disassemble was reached but is not an
    25282528     * exit block - no successors.
    25292529     */
    2530     DBGFCFGBBENDTYPE_LAST_DISASSEMBLED,
     2530    DBGFFLOWBBENDTYPE_LAST_DISASSEMBLED,
    25312531    /** Unconditional control flow change because the successor is referenced by multiple
    25322532     * basic blocks. - 1 successor. */
    2533     DBGFCFGBBENDTYPE_UNCOND,
     2533    DBGFFLOWBBENDTYPE_UNCOND,
    25342534    /** Unconditional control flow change because of a jump instruction - 1 successor. */
    2535     DBGFCFGBBENDTYPE_UNCOND_JMP,
     2535    DBGFFLOWBBENDTYPE_UNCOND_JMP,
    25362536    /** Conditional control flow change - 2 successors. */
    2537     DBGFCFGBBENDTYPE_COND,
     2537    DBGFFLOWBBENDTYPE_COND,
    25382538    /** 32bit hack. */
    2539     DBGFCFGBBENDTYPE_32BIT_HACK = 0x7fffffff
    2540 } DBGFCFGBBENDTYPE;
     2539    DBGFFLOWBBENDTYPE_32BIT_HACK = 0x7fffffff
     2540} DBGFFLOWBBENDTYPE;
    25412541
    25422542/**
    25432543 * DBGF control flow graph iteration order.
    25442544 */
    2545 typedef enum DBGFCFGITORDER
     2545typedef enum DBGFFLOWITORDER
    25462546{
    25472547    /** Invalid order. */
    2548     DBGFCFGITORDER_INVALID = 0,
     2548    DBGFFLOWITORDER_INVALID = 0,
    25492549    /** From lowest to highest basic block start address. */
    2550     DBGFCFGITORDER_BY_ADDR_LOWEST_FIRST,
     2550    DBGFFLOWITORDER_BY_ADDR_LOWEST_FIRST,
    25512551    /** From highest to lowest basic block start address. */
    2552     DBGFCFGITORDER_BY_ADDR_HIGHEST_FIRST,
     2552    DBGFFLOWITORDER_BY_ADDR_HIGHEST_FIRST,
    25532553    /** Depth first traversing starting from the entry block. */
    2554     DBGFCFGITORDER_DEPTH_FRIST,
     2554    DBGFFLOWITORDER_DEPTH_FRIST,
    25552555    /** Breadth first traversing starting from the entry block. */
    2556     DBGFCFGITORDER_BREADTH_FIRST,
     2556    DBGFFLOWITORDER_BREADTH_FIRST,
    25572557    /** Usual 32bit hack. */
    2558     DBGFCFGITORDER_32BIT_HACK = 0x7fffffff
    2559 } DBGFCFGITORDER;
     2558    DBGFFLOWITORDER_32BIT_HACK = 0x7fffffff
     2559} DBGFFLOWITORDER;
    25602560/** POinter to a iteration order enum. */
    2561 typedef DBGFCFGITORDER *PDBGFCFGITORDER;
    2562 
    2563 /**
    2564  * DBGF control flow graph dumper callback.
    2565  *
    2566  * @returns VBox status code. Any non VINF_SUCCESS status code will abort the dumping.
    2567  *
    2568  * @param   psz             The string to dump
    2569  * @param   pvUser          Opaque user data.
    2570  */
    2571 typedef DECLCALLBACK(int) FNDBGFR3CFGDUMP(const char *psz, void *pvUser);
    2572 /** Pointer to a FNDBGFR3TYPEDUMP. */
    2573 typedef FNDBGFR3CFGDUMP *PFNDBGFR3CFGDUMP;
    2574 
    2575 VMMR3DECL(int)              DBGFR3CfgCreate(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddressStart, uint32_t cbDisasmMax,
    2576                                             uint32_t fFlags, PDBGFCFG phCfg);
    2577 VMMR3DECL(uint32_t)         DBGFR3CfgRetain(DBGFCFG hCfg);
    2578 VMMR3DECL(uint32_t)         DBGFR3CfgRelease(DBGFCFG hCfg);
    2579 VMMR3DECL(int)              DBGFR3CfgQueryStartBb(DBGFCFG hCfg, PDBGFCFGBB phCfgBb);
    2580 VMMR3DECL(int)              DBGFR3CfgQueryBbByAddress(DBGFCFG hCfg, PDBGFADDRESS pAddr, PDBGFCFGBB phCfgBb);
    2581 VMMR3DECL(uint32_t)         DBGFR3CfgGetBbCount(DBGFCFG hCfg);
    2582 VMMR3DECL(uint32_t)         DBGFR3CfgBbRetain(DBGFCFGBB hCfgBb);
    2583 VMMR3DECL(uint32_t)         DBGFR3CfgBbRelease(DBGFCFGBB hCfgBb);
    2584 VMMR3DECL(PDBGFADDRESS)     DBGFR3CfgBbGetStartAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrStart);
    2585 VMMR3DECL(PDBGFADDRESS)     DBGFR3CfgBbGetEndAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrEnd);
    2586 VMMR3DECL(PDBGFADDRESS)     DBGFR3CfgBbGetBranchAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrTarget);
    2587 VMMR3DECL(PDBGFADDRESS)     DBGFR3CfgBbGetFollowingAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrFollow);
    2588 VMMR3DECL(DBGFCFGBBENDTYPE) DBGFR3CfgBbGetType(DBGFCFGBB hCfgBb);
    2589 VMMR3DECL(uint32_t)         DBGFR3CfgBbGetInstrCount(DBGFCFGBB hCfgBb);
    2590 VMMR3DECL(uint32_t)         DBGFR3CfgBbGetFlags(DBGFCFGBB hCfgBb);
    2591 VMMR3DECL(int)              DBGFR3CfgBbQueryError(DBGFCFGBB hCfgBb, const char **ppszErr);
    2592 VMMR3DECL(int)              DBGFR3CfgBbQueryInstr(DBGFCFGBB hCfgBb, uint32_t idxInstr, PDBGFADDRESS pAddrInstr,
    2593                                                   uint32_t *pcbInstr, const char **ppszInstr);
    2594 VMMR3DECL(int)              DBGFR3CfgBbQuerySuccessors(DBGFCFGBB hCfgBb, PDBGFCFGBB phCfgBbFollow,
    2595                                                        PDBGFCFGBB phCfgBbTarget);
    2596 VMMR3DECL(uint32_t)         DBGFR3CfgBbGetRefBbCount(DBGFCFGBB hCfgBb);
    2597 VMMR3DECL(int)              DBGFR3CfgBbGetRefBb(DBGFCFGBB hCfgBb, PDBGFCFGBB pahCfgBbRef, uint32_t cRef);
    2598 VMMR3DECL(int)              DBGFR3CfgItCreate(DBGFCFG hCfg, DBGFCFGITORDER enmOrder, PDBGFCFGIT phCfgIt);
    2599 VMMR3DECL(void)             DBGFR3CfgItDestroy(DBGFCFGIT hCfgIt);
    2600 VMMR3DECL(DBGFCFGBB)        DBGFR3CfgItNext(DBGFCFGIT hCfgIt);
    2601 VMMR3DECL(int)              DBGFR3CfgItReset(DBGFCFGIT hCfgIt);
     2561typedef DBGFFLOWITORDER *PDBGFFLOWITORDER;
     2562
     2563
     2564VMMR3DECL(int)               DBGFR3FlowCreate(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddressStart, uint32_t cbDisasmMax,
     2565                                             uint32_t fFlags, PDBGFFLOW phFlow);
     2566VMMR3DECL(uint32_t)          DBGFR3FlowRetain(DBGFFLOW hFlow);
     2567VMMR3DECL(uint32_t)          DBGFR3FlowRelease(DBGFFLOW hFlow);
     2568VMMR3DECL(int)               DBGFR3FlowQueryStartBb(DBGFFLOW hFlow, PDBGFFLOWBB phFlowBb);
     2569VMMR3DECL(int)               DBGFR3FlowQueryBbByAddress(DBGFFLOW hFlow, PDBGFADDRESS pAddr, PDBGFFLOWBB phFlowBb);
     2570VMMR3DECL(uint32_t)          DBGFR3FlowGetBbCount(DBGFFLOW hFlow);
     2571VMMR3DECL(uint32_t)          DBGFR3FlowBbRetain(DBGFFLOWBB hFlowBb);
     2572VMMR3DECL(uint32_t)          DBGFR3FlowBbRelease(DBGFFLOWBB hFlowBb);
     2573VMMR3DECL(PDBGFADDRESS)      DBGFR3FlowBbGetStartAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrStart);
     2574VMMR3DECL(PDBGFADDRESS)      DBGFR3FlowBbGetEndAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrEnd);
     2575VMMR3DECL(PDBGFADDRESS)      DBGFR3FlowBbGetBranchAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrTarget);
     2576VMMR3DECL(PDBGFADDRESS)      DBGFR3FlowBbGetFollowingAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrFollow);
     2577VMMR3DECL(DBGFFLOWBBENDTYPE) DBGFR3FlowBbGetType(DBGFFLOWBB hFlowBb);
     2578VMMR3DECL(uint32_t)          DBGFR3FlowBbGetInstrCount(DBGFFLOWBB hFlowBb);
     2579VMMR3DECL(uint32_t)          DBGFR3FlowBbGetFlags(DBGFFLOWBB hFlowBb);
     2580VMMR3DECL(int)               DBGFR3FlowBbQueryError(DBGFFLOWBB hFlowBb, const char **ppszErr);
     2581VMMR3DECL(int)               DBGFR3FlowBbQueryInstr(DBGFFLOWBB hFlowBb, uint32_t idxInstr, PDBGFADDRESS pAddrInstr,
     2582                                                    uint32_t *pcbInstr, const char **ppszInstr);
     2583VMMR3DECL(int)               DBGFR3FlowBbQuerySuccessors(DBGFFLOWBB hFlowBb, PDBGFFLOWBB phFlowBbFollow,
     2584                                                         PDBGFFLOWBB phFlowBbTarget);
     2585VMMR3DECL(uint32_t)          DBGFR3FlowBbGetRefBbCount(DBGFFLOWBB hFlowBb);
     2586VMMR3DECL(int)               DBGFR3FlowBbGetRefBb(DBGFFLOWBB hFlowBb, PDBGFFLOWBB pahFlowBbRef, uint32_t cRef);
     2587VMMR3DECL(int)               DBGFR3FlowItCreate(DBGFFLOW hFlow, DBGFFLOWITORDER enmOrder, PDBGFFLOWIT phFlowIt);
     2588VMMR3DECL(void)              DBGFR3FlowItDestroy(DBGFFLOWIT hFlowIt);
     2589VMMR3DECL(DBGFFLOWBB)        DBGFR3FlowItNext(DBGFFLOWIT hFlowIt);
     2590VMMR3DECL(int)               DBGFR3FlowItReset(DBGFFLOWIT hFlowIt);
    26022591
    26032592/** @} */
  • trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp

    r64555 r64559  
    14211421 *
    14221422 * @returns nothing.
    1423  * @param   hCfgBb              The basic block handle.
     1423 * @param   hFlowBb              The basic block handle.
    14241424 * @param   pDumpBb             The dumper state to fill in for the basic block.
    14251425 */
    1426 static void dbgcCmdUnassembleCfgDumpCalcBbSize(DBGFCFGBB hCfgBb, PDBGCCFGBBDUMP pDumpBb)
    1427 {
    1428     uint32_t fFlags = DBGFR3CfgBbGetFlags(hCfgBb);
    1429     uint32_t cInstr = DBGFR3CfgBbGetInstrCount(hCfgBb);
    1430 
    1431     pDumpBb->hCfgBb = hCfgBb;
     1426static void dbgcCmdUnassembleCfgDumpCalcBbSize(DBGFFLOWBB hFlowBb, PDBGCFLOWBBDUMP pDumpBb)
     1427{
     1428    uint32_t fFlags = DBGFR3FlowBbGetFlags(hFlowBb);
     1429    uint32_t cInstr = DBGFR3FlowBbGetInstrCount(hFlowBb);
     1430
     1431    pDumpBb->hFlowBb   = hFlowBb;
    14321432    pDumpBb->cchHeight = cInstr + 4; /* Include spacing and border top and bottom. */
    1433     pDumpBb->cchWidth = 0;
    1434     DBGFR3CfgBbGetStartAddress(hCfgBb, &pDumpBb->AddrStart);
    1435 
    1436     DBGFCFGBBENDTYPE enmType = DBGFR3CfgBbGetType(hCfgBb);
    1437     if (   enmType == DBGFCFGBBENDTYPE_COND
    1438         || enmType == DBGFCFGBBENDTYPE_UNCOND_JMP)
    1439         DBGFR3CfgBbGetBranchAddress(hCfgBb, &pDumpBb->AddrTarget);
    1440 
    1441     if (fFlags & DBGF_CFG_BB_F_INCOMPLETE_ERR)
     1433    pDumpBb->cchWidth  = 0;
     1434    DBGFR3FlowBbGetStartAddress(hFlowBb, &pDumpBb->AddrStart);
     1435
     1436    DBGFFLOWBBENDTYPE enmType = DBGFR3FlowBbGetType(hFlowBb);
     1437    if (   enmType == DBGFFLOWBBENDTYPE_COND
     1438        || enmType == DBGFFLOWBBENDTYPE_UNCOND_JMP)
     1439        DBGFR3FlowBbGetBranchAddress(hFlowBb, &pDumpBb->AddrTarget);
     1440
     1441    if (fFlags & DBGF_FLOW_BB_F_INCOMPLETE_ERR)
    14421442    {
    14431443        const char *pszErr = NULL;
    1444         DBGFR3CfgBbQueryError(hCfgBb, &pszErr);
     1444        DBGFR3FlowBbQueryError(hFlowBb, &pszErr);
    14451445        if (pszErr)
    14461446        {
     
    14521452    {
    14531453        const char *pszInstr = NULL;
    1454         int rc = DBGFR3CfgBbQueryInstr(hCfgBb, i, NULL, NULL, &pszInstr);
     1454        int rc = DBGFR3FlowBbQueryInstr(hFlowBb, i, NULL, NULL, &pszInstr);
    14551455        AssertRC(rc);
    14561456        pDumpBb->cchWidth = RT_MAX(pDumpBb->cchWidth, (uint32_t)strlen(pszInstr));
     
    15281528 * @param   hScreen             The screen to draw to.
    15291529 */
    1530 static void dbgcCmdUnassembleCfgDumpBb(PDBGCCFGBBDUMP pDumpBb, DBGCSCREEN hScreen)
     1530static void dbgcCmdUnassembleCfgDumpBb(PDBGCFLOWBBDUMP pDumpBb, DBGCSCREEN hScreen)
    15311531{
    15321532    uint32_t uStartY = pDumpBb->uStartY;
    1533     bool fError = RT_BOOL(DBGFR3CfgBbGetFlags(pDumpBb->hCfgBb) & DBGF_CFG_BB_F_INCOMPLETE_ERR);
     1533    bool fError = RT_BOOL(DBGFR3FlowBbGetFlags(pDumpBb->hFlowBb) & DBGF_FLOW_BB_F_INCOMPLETE_ERR);
    15341534    DBGCSCREENCOLOR enmColor = fError ? DBGCSCREENCOLOR_RED_BRIGHT : DBGCSCREENCOLOR_DEFAULT;
    15351535
     
    15391539    uStartY++;
    15401540
    1541     uint32_t cInstr = DBGFR3CfgBbGetInstrCount(pDumpBb->hCfgBb);
     1541    uint32_t cInstr = DBGFR3FlowBbGetInstrCount(pDumpBb->hFlowBb);
    15421542    for (unsigned i = 0; i < cInstr; i++)
    15431543    {
    15441544        const char *pszInstr = NULL;
    1545         DBGFR3CfgBbQueryInstr(pDumpBb->hCfgBb, i, NULL, NULL, &pszInstr);
     1545        DBGFR3FlowBbQueryInstr(pDumpBb->hFlowBb, i, NULL, NULL, &pszInstr);
    15461546        dbgcCmdUnassembleCfgDumpBbText(hScreen, pDumpBb->uStartX, uStartY + i,
    15471547                                       pDumpBb->cchWidth, pszInstr, DBGCSCREENCOLOR_DEFAULT);
     
    15521552    {
    15531553        const char *pszErr = NULL;
    1554         DBGFR3CfgBbQueryError(pDumpBb->hCfgBb, &pszErr);
     1554        DBGFR3FlowBbQueryError(pDumpBb->hFlowBb, &pszErr);
    15551555        if (pszErr)
    15561556            dbgcCmdUnassembleCfgDumpBbText(hScreen, pDumpBb->uStartX, uStartY,
     
    15741574 * @param   pCmdHlp             The command helper callback table.
    15751575 */
    1576 static int dbgcCmdUnassembleCfgDump(DBGFCFG hCfg, bool fUseColor, PDBGCCMDHLP pCmdHlp)
    1577 {
    1578     DBGFCFGIT hCfgIt;
    1579     int rc = DBGFR3CfgItCreate(hCfg, DBGFCFGITORDER_BY_ADDR_LOWEST_FIRST, &hCfgIt);
     1576static int dbgcCmdUnassembleCfgDump(DBGFFLOW hCfg, bool fUseColor, PDBGCCMDHLP pCmdHlp)
     1577{
     1578    DBGFFLOWIT hCfgIt;
     1579    int rc = DBGFR3FlowItCreate(hCfg, DBGFFLOWITORDER_BY_ADDR_LOWEST_FIRST, &hCfgIt);
    15801580    if (RT_SUCCESS(rc))
    15811581    {
    1582         uint32_t cBbs = DBGFR3CfgGetBbCount(hCfg);
    1583         PDBGCCFGBBDUMP paDumpBb = (PDBGCCFGBBDUMP)RTMemTmpAllocZ(cBbs * sizeof(DBGCCFGBBDUMP));
     1582        uint32_t cBbs = DBGFR3FlowGetBbCount(hCfg);
     1583        PDBGCFLOWBBDUMP paDumpBb = (PDBGCFLOWBBDUMP)RTMemTmpAllocZ(cBbs * sizeof(DBGCFLOWBBDUMP));
    15841584        if (paDumpBb)
    15851585        {
    15861586            /* Calculate the sizes of each basic block first. */
    1587             DBGFCFGBB hCfgBb = DBGFR3CfgItNext(hCfgIt);
     1587            DBGFFLOWBB hFlowBb = DBGFR3FlowItNext(hCfgIt);
    15881588            uint32_t idxDumpBb = 0;
    1589             while (hCfgBb)
     1589            while (hFlowBb)
    15901590            {
    1591                 dbgcCmdUnassembleCfgDumpCalcBbSize(hCfgBb, &paDumpBb[idxDumpBb]);
     1591                dbgcCmdUnassembleCfgDumpCalcBbSize(hFlowBb, &paDumpBb[idxDumpBb]);
    15921592                idxDumpBb++;
    1593                 hCfgBb = DBGFR3CfgItNext(hCfgIt);
     1593                hFlowBb = DBGFR3FlowItNext(hCfgIt);
    15941594            }
    15951595
     
    16011601            for (unsigned i = 0; i < cBbs; i++)
    16021602            {
    1603                 PDBGCCFGBBDUMP pDumpBb = &paDumpBb[i];
     1603                PDBGCFLOWBBDUMP pDumpBb = &paDumpBb[i];
    16041604                cchWidth = RT_MAX(cchWidth, pDumpBb->cchWidth);
    16051605                cchHeight += pDumpBb->cchHeight;
    16061606
    16071607                /* Incomplete blocks don't have a successor. */
    1608                 if (DBGFR3CfgBbGetFlags(pDumpBb->hCfgBb) & DBGF_CFG_BB_F_INCOMPLETE_ERR)
     1608                if (DBGFR3FlowBbGetFlags(pDumpBb->hFlowBb) & DBGF_FLOW_BB_F_INCOMPLETE_ERR)
    16091609                    continue;
    16101610
    1611                 switch (DBGFR3CfgBbGetType(pDumpBb->hCfgBb))
     1611                switch (DBGFR3FlowBbGetType(pDumpBb->hFlowBb))
    16121612                {
    1613                     case DBGFCFGBBENDTYPE_EXIT:
    1614                     case DBGFCFGBBENDTYPE_LAST_DISASSEMBLED:
     1613                    case DBGFFLOWBBENDTYPE_EXIT:
     1614                    case DBGFFLOWBBENDTYPE_LAST_DISASSEMBLED:
    16151615                        break;
    1616                     case DBGFCFGBBENDTYPE_UNCOND_JMP:
     1616                    case DBGFFLOWBBENDTYPE_UNCOND_JMP:
    16171617                        if (   dbgcCmdUnassembleCfgAddrLower(&pDumpBb->AddrTarget, &pDumpBb->AddrStart)
    16181618                            || dbgcCmdUnassembleCfgAddrEqual(&pDumpBb->AddrTarget, &pDumpBb->AddrStart))
     
    16211621                            cchRightExtra++;
    16221622                        break;
    1623                     case DBGFCFGBBENDTYPE_UNCOND:
     1623                    case DBGFFLOWBBENDTYPE_UNCOND:
    16241624                        cchHeight += 2; /* For the arrow down to the next basic block. */
    16251625                        break;
    1626                     case DBGFCFGBBENDTYPE_COND:
     1626                    case DBGFFLOWBBENDTYPE_COND:
    16271627                        cchHeight += 2; /* For the arrow down to the next basic block. */
    16281628                        if (   dbgcCmdUnassembleCfgAddrLower(&pDumpBb->AddrTarget, &pDumpBb->AddrStart)
     
    16541654
    16551655                    /* Incomplete blocks don't have a successor. */
    1656                     if (DBGFR3CfgBbGetFlags(paDumpBb[i].hCfgBb) & DBGF_CFG_BB_F_INCOMPLETE_ERR)
     1656                    if (DBGFR3FlowBbGetFlags(paDumpBb[i].hFlowBb) & DBGF_FLOW_BB_F_INCOMPLETE_ERR)
    16571657                        continue;
    16581658
    1659                     switch (DBGFR3CfgBbGetType(paDumpBb[i].hCfgBb))
     1659                    switch (DBGFR3FlowBbGetType(paDumpBb[i].hFlowBb))
    16601660                    {
    1661                         case DBGFCFGBBENDTYPE_EXIT:
    1662                         case DBGFCFGBBENDTYPE_LAST_DISASSEMBLED:
    1663                         case DBGFCFGBBENDTYPE_UNCOND_JMP:
     1661                        case DBGFFLOWBBENDTYPE_EXIT:
     1662                        case DBGFFLOWBBENDTYPE_LAST_DISASSEMBLED:
     1663                        case DBGFFLOWBBENDTYPE_UNCOND_JMP:
    16641664                            break;
    1665                         case DBGFCFGBBENDTYPE_UNCOND:
     1665                        case DBGFFLOWBBENDTYPE_UNCOND:
    16661666                            /* Draw the arrow down to the next block. */
    16671667                            dbgcScreenAsciiDrawCharacter(hScreen, cchLeftExtra + cchWidth / 2, uY,
     
    16721672                            uY++;
    16731673                            break;
    1674                         case DBGFCFGBBENDTYPE_COND:
     1674                        case DBGFFLOWBBENDTYPE_COND:
    16751675                            /* Draw the arrow down to the next block. */
    16761676                            dbgcScreenAsciiDrawCharacter(hScreen, cchLeftExtra + cchWidth / 2, uY,
     
    16911691                for (unsigned i = 0; i < cBbs; i++)
    16921692                {
    1693                     PDBGCCFGBBDUMP pDumpBb = &paDumpBb[i];
     1693                    PDBGCFLOWBBDUMP pDumpBb = &paDumpBb[i];
    16941694
    16951695                    /* Incomplete blocks don't have a successor. */
    1696                     if (DBGFR3CfgBbGetFlags(pDumpBb->hCfgBb) & DBGF_CFG_BB_F_INCOMPLETE_ERR)
     1696                    if (DBGFR3FlowBbGetFlags(pDumpBb->hFlowBb) & DBGF_FLOW_BB_F_INCOMPLETE_ERR)
    16971697                        continue;
    16981698
    1699                     switch (DBGFR3CfgBbGetType(pDumpBb->hCfgBb))
     1699                    switch (DBGFR3FlowBbGetType(pDumpBb->hFlowBb))
    17001700                    {
    1701                         case DBGFCFGBBENDTYPE_EXIT:
    1702                         case DBGFCFGBBENDTYPE_LAST_DISASSEMBLED:
    1703                         case DBGFCFGBBENDTYPE_UNCOND:
     1701                        case DBGFFLOWBBENDTYPE_EXIT:
     1702                        case DBGFFLOWBBENDTYPE_LAST_DISASSEMBLED:
     1703                        case DBGFFLOWBBENDTYPE_UNCOND:
    17041704                            break;
    1705                         case DBGFCFGBBENDTYPE_COND:
    1706                         case DBGFCFGBBENDTYPE_UNCOND_JMP:
     1705                        case DBGFFLOWBBENDTYPE_COND:
     1706                        case DBGFFLOWBBENDTYPE_UNCOND_JMP:
    17071707                        {
    17081708                            /* Find the target first to get the coordinates. */
    1709                             PDBGCCFGBBDUMP pDumpBbTgt = NULL;
     1709                            PDBGCFLOWBBDUMP pDumpBbTgt = NULL;
    17101710                            for (idxDumpBb = 0; idxDumpBb < cBbs; idxDumpBb++)
    17111711                            {
     
    17791779
    17801780            for (unsigned i = 0; i < cBbs; i++)
    1781                 DBGFR3CfgBbRelease(paDumpBb[i].hCfgBb);
     1781                DBGFR3FlowBbRelease(paDumpBb[i].hFlowBb);
    17821782            RTMemTmpFree(paDumpBb);
    17831783        }
     
    17851785            rc = VERR_NO_MEMORY;
    17861786
    1787         DBGFR3CfgItDestroy(hCfgIt);
     1787        DBGFR3FlowItDestroy(hCfgIt);
    17881788    }
    17891789
     
    19321932    }
    19331933
    1934     DBGFCFG hCfg;
    1935     rc = DBGFR3CfgCreate(pUVM, pDbgc->idCpu, &CurAddr, 0 /*cbDisasmMax*/, fFlags, &hCfg);
     1934    DBGFFLOW hCfg;
     1935    rc = DBGFR3FlowCreate(pUVM, pDbgc->idCpu, &CurAddr, 0 /*cbDisasmMax*/, fFlags, &hCfg);
    19361936    if (RT_SUCCESS(rc))
    19371937    {
    19381938        /* Dump the graph. */
    19391939        rc = dbgcCmdUnassembleCfgDump(hCfg, fUseColor, pCmdHlp);
    1940         DBGFR3CfgRelease(hCfg);
     1940        DBGFR3FlowRelease(hCfg);
    19411941    }
    19421942    else
    1943         rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGFR3CfgCreate failed on '%Dv'", &pDbgc->DisasmPos);
     1943        rc = DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGFR3FlowCreate failed on '%Dv'", &pDbgc->DisasmPos);
    19441944
    19451945    NOREF(pCmd);
  • trunk/src/VBox/Debugger/DBGCInternal.h

    r64554 r64559  
    428428 * Control flow graph basic block dumper state
    429429 */
    430 typedef struct DBGCCFGBBDUMP
     430typedef struct DBGCFLOWBBDUMP
    431431{
    432432    /** The basic block referenced. */
    433     DBGFCFGBB               hCfgBb;
     433    DBGFFLOWBB              hFlowBb;
    434434    /** Cached start address. */
    435435    DBGFADDRESS             AddrStart;
     
    444444    /** Y coordinate of the start. */
    445445    uint32_t                uStartY;
    446 } DBGCCFGBBDUMP;
     446} DBGCFLOWBBDUMP;
    447447/** Pointer to the CFG basic block dump state. */
    448 typedef DBGCCFGBBDUMP *PDBGCCFGBBDUMP;
     448typedef DBGCFLOWBBDUMP *PDBGCFLOWBBDUMP;
    449449
    450450/*******************************************************************************
  • trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp

    r64556 r64559  
    381381}
    382382
    383 VMMR3DECL(int) DBGFR3CfgCreate(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddressStart, uint32_t cbDisasmMax,
    384                                uint32_t fFlags, PDBGFCFG phCfg)
    385 {
    386     return VERR_INTERNAL_ERROR;
    387 }
    388 VMMR3DECL(uint32_t) DBGFR3CfgRetain(DBGFCFG hCfg)
    389 {
    390     return 0;
    391 }
    392 VMMR3DECL(uint32_t) DBGFR3CfgRelease(DBGFCFG hCfg)
    393 {
    394     return 0;
    395 }
    396 VMMR3DECL(int) DBGFR3CfgQueryStartBb(DBGFCFG hCfg, PDBGFCFGBB phCfgBb)
    397 {
    398     return VERR_INTERNAL_ERROR;
    399 }
    400 VMMR3DECL(int) DBGFR3CfgQueryBbByAddress(DBGFCFG hCfg, PDBGFADDRESS pAddr, PDBGFCFGBB phCfgBb)
    401 {
    402     return VERR_INTERNAL_ERROR;
    403 }
    404 VMMR3DECL(uint32_t) DBGFR3CfgGetBbCount(DBGFCFG hCfg)
    405 {
    406     return 0;
    407 }
    408 VMMR3DECL(int) DBGFR3CfgDump(DBGFCFG hCfg, PFNDBGFR3CFGDUMP pfnDump, void *pvUser)
    409 {
    410     return VERR_INTERNAL_ERROR;
    411 }
    412 VMMR3DECL(uint32_t) DBGFR3CfgBbRetain(DBGFCFGBB hCfgBb)
    413 {
    414     return 0;
    415 }
    416 VMMR3DECL(uint32_t) DBGFR3CfgBbRelease(DBGFCFGBB hCfgBb)
    417 {
    418     return 0;
    419 }
    420 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetStartAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrStart)
    421 {
    422     return NULL;
    423 }
    424 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetEndAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrEnd)
    425 {
    426     return NULL;
    427 }
    428 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetBranchAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrTarget)
    429 {
    430     return NULL;
    431 }
    432 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetFollowingAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrFollow)
    433 {
    434     return NULL;
    435 }
    436 VMMR3DECL(DBGFCFGBBENDTYPE) DBGFR3CfgBbGetType(DBGFCFGBB hCfgBb)
    437 {
    438     return DBGFCFGBBENDTYPE_INVALID;
    439 }
    440 VMMR3DECL(uint32_t) DBGFR3CfgBbGetInstrCount(DBGFCFGBB hCfgBb)
    441 {
    442     return 0;
    443 }
    444 VMMR3DECL(uint32_t) DBGFR3CfgBbGetFlags(DBGFCFGBB hCfgBb)
    445 {
    446     return 0;
    447 }
    448 VMMR3DECL(int) DBGFR3CfgBbQueryError(DBGFCFGBB hCfgBb, const char **ppszErr)
    449 {
    450     return VERR_INTERNAL_ERROR;
    451 }
    452 VMMR3DECL(int) DBGFR3CfgBbQueryInstr(DBGFCFGBB hCfgBb, uint32_t idxInstr, PDBGFADDRESS pAddrInstr,
    453                                      uint32_t *pcbInstr, const char **ppszInstr)
    454 {
    455     return VERR_INTERNAL_ERROR;
    456 }
    457 VMMR3DECL(int) DBGFR3CfgBbQuerySuccessors(DBGFCFGBB hCfgBb, PDBGFCFGBB phCfgBbFollow,
    458                                           PDBGFCFGBB phCfgBbTarget)
    459 {
    460     return VERR_INTERNAL_ERROR;
    461 }
    462 VMMR3DECL(uint32_t) DBGFR3CfgBbGetRefBbCount(DBGFCFGBB hCfgBb)
    463 {
    464     return 0;
    465 }
    466 VMMR3DECL(int) DBGFR3CfgBbGetRefBb(DBGFCFGBB hCfgBb, PDBGFCFGBB pahCfgBbRef, uint32_t cRef)
    467 {
    468     return VERR_INTERNAL_ERROR;
    469 }
    470 VMMR3DECL(int) DBGFR3CfgItCreate(DBGFCFG hCfg, DBGFCFGITORDER enmOrder, PDBGFCFGIT phCfgIt)
    471 {
    472     return VERR_INTERNAL_ERROR;
    473 }
    474 VMMR3DECL(void) DBGFR3CfgItDestroy(DBGFCFGIT hCfgIt)
    475 {
    476 }
    477 VMMR3DECL(DBGFCFGBB) DBGFR3CfgItNext(DBGFCFGIT hCfgIt)
    478 {
    479     return NULL;
    480 }
    481 VMMR3DECL(int) DBGFR3CfgItReset(DBGFCFGIT hCfgIt)
     383VMMR3DECL(int) DBGFR3FlowCreate(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddressStart, uint32_t cbDisasmMax,
     384                               uint32_t fFlags, PDBGFFLOW phFlow)
     385{
     386    return VERR_INTERNAL_ERROR;
     387}
     388VMMR3DECL(uint32_t) DBGFR3FlowRetain(DBGFFLOW hFlow)
     389{
     390    return 0;
     391}
     392VMMR3DECL(uint32_t) DBGFR3FlowRelease(DBGFFLOW hFlow)
     393{
     394    return 0;
     395}
     396VMMR3DECL(int) DBGFR3FlowQueryStartBb(DBGFFLOW hFlow, PDBGFFLOWBB phFlowBb)
     397{
     398    return VERR_INTERNAL_ERROR;
     399}
     400VMMR3DECL(int) DBGFR3FlowQueryBbByAddress(DBGFFLOW hFlow, PDBGFADDRESS pAddr, PDBGFFLOWBB phFlowBb)
     401{
     402    return VERR_INTERNAL_ERROR;
     403}
     404VMMR3DECL(uint32_t) DBGFR3FlowGetBbCount(DBGFFLOW hFlow)
     405{
     406    return 0;
     407}
     408VMMR3DECL(uint32_t) DBGFR3FlowBbRetain(DBGFFLOWBB hFlowBb)
     409{
     410    return 0;
     411}
     412VMMR3DECL(uint32_t) DBGFR3FlowBbRelease(DBGFFLOWBB hFlowBb)
     413{
     414    return 0;
     415}
     416VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetStartAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrStart)
     417{
     418    return NULL;
     419}
     420VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetEndAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrEnd)
     421{
     422    return NULL;
     423}
     424VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetBranchAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrTarget)
     425{
     426    return NULL;
     427}
     428VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetFollowingAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrFollow)
     429{
     430    return NULL;
     431}
     432VMMR3DECL(DBGFFLOWBBENDTYPE) DBGFR3FlowBbGetType(DBGFFLOWBB hFlowBb)
     433{
     434    return DBGFFLOWBBENDTYPE_INVALID;
     435}
     436VMMR3DECL(uint32_t) DBGFR3FlowBbGetInstrCount(DBGFFLOWBB hFlowBb)
     437{
     438    return 0;
     439}
     440VMMR3DECL(uint32_t) DBGFR3FlowBbGetFlags(DBGFFLOWBB hFlowBb)
     441{
     442    return 0;
     443}
     444VMMR3DECL(int) DBGFR3FlowBbQueryError(DBGFFLOWBB hFlowBb, const char **ppszErr)
     445{
     446    return VERR_INTERNAL_ERROR;
     447}
     448VMMR3DECL(int) DBGFR3FlowBbQueryInstr(DBGFFLOWBB hFlowBb, uint32_t idxInstr, PDBGFADDRESS pAddrInstr,
     449                                      uint32_t *pcbInstr, const char **ppszInstr)
     450{
     451    return VERR_INTERNAL_ERROR;
     452}
     453VMMR3DECL(int) DBGFR3FlowBbQuerySuccessors(DBGFFLOWBB hFlowBb, PDBGFFLOWBB phFlowBbFollow,
     454                                           PDBGFFLOWBB phFlowBbTarget)
     455{
     456    return VERR_INTERNAL_ERROR;
     457}
     458VMMR3DECL(uint32_t) DBGFR3FlowBbGetRefBbCount(DBGFFLOWBB hFlowBb)
     459{
     460    return 0;
     461}
     462VMMR3DECL(int) DBGFR3FlowBbGetRefBb(DBGFFLOWBB hFlowBb, PDBGFFLOWBB pahFlowBbRef, uint32_t cRef)
     463{
     464    return VERR_INTERNAL_ERROR;
     465}
     466VMMR3DECL(int) DBGFR3FlowItCreate(DBGFFLOW hFlow, DBGFFLOWITORDER enmOrder, PDBGFFLOWIT phFlowIt)
     467{
     468    return VERR_INTERNAL_ERROR;
     469}
     470VMMR3DECL(void) DBGFR3FlowItDestroy(DBGFFLOWIT hFlowIt)
     471{
     472}
     473VMMR3DECL(DBGFFLOWBB) DBGFR3FlowItNext(DBGFFLOWIT hFlowIt)
     474{
     475    return NULL;
     476}
     477VMMR3DECL(int) DBGFR3FlowItReset(DBGFFLOWIT hFlowIt)
    482478{
    483479    return VERR_INTERNAL_ERROR;
  • trunk/src/VBox/VMM/Makefile.kmk

    r64553 r64559  
    164164        VMMR3/DBGFReg.cpp \
    165165        VMMR3/DBGFStack.cpp \
    166         VMMR3/DBGFR3Cfg.cpp \
     166        VMMR3/DBGFR3Flow.cpp \
    167167        VMMR3/DBGFR3Trace.cpp \
    168168        VMMR3/DBGFR3Type.cpp \
  • trunk/src/VBox/VMM/VMMR3/DBGFR3Flow.cpp

    r64558 r64559  
    1717
    1818
    19 /** @page pg_dbgf_cfg    DBGFR3Cfg - Control Flow Graph Interface
     19/** @page pg_dbgf_cfg    DBGFR3Flow - Control Flow Graph Interface
    2020 *
    2121 * The control flow graph interface provides an API to disassemble
     
    5757 * Internal control flow graph state.
    5858 */
    59 typedef struct DBGFCFGINT
     59typedef struct DBGFFLOWINT
    6060{
    6161    /** Reference counter. */
     
    6464    uint32_t volatile       cRefsBb;
    6565    /** List of all basic blocks. */
    66     RTLISTANCHOR            LstCfgBb;
     66    RTLISTANCHOR            LstFlowBb;
    6767    /** Number of basic blocks in this control flow graph. */
    6868    uint32_t                cBbs;
     
    7373    /** String cache for disassembled instructions. */
    7474    RTSTRCACHE              hStrCacheInstr;
    75 } DBGFCFGINT;
     75} DBGFFLOWINT;
    7676/** Pointer to an internal control flow graph state. */
    77 typedef DBGFCFGINT *PDBGFCFGINT;
     77typedef DBGFFLOWINT *PDBGFFLOWINT;
    7878
    7979/**
    8080 * Instruction record
    8181 */
    82 typedef struct DBGFCFGBBINSTR
     82typedef struct DBGFFLOWBBINSTR
    8383{
    8484    /** Instruction address. */
     
    8888    /** Disassembled instruction string. */
    8989    const char              *pszInstr;
    90 } DBGFCFGBBINSTR;
     90} DBGFFLOWBBINSTR;
    9191/** Pointer to an instruction record. */
    92 typedef DBGFCFGBBINSTR *PDBGFCFGBBINSTR;
     92typedef DBGFFLOWBBINSTR *PDBGFFLOWBBINSTR;
    9393
    9494/**
    9595 * Internal control flow graph basic block state.
    9696 */
    97 typedef struct DBGFCFGBBINT
     97typedef struct DBGFFLOWBBINT
    9898{
    9999    /** Node for the list of all basic blocks. */
    100     RTLISTNODE              NdCfgBb;
     100    RTLISTNODE               NdFlowBb;
    101101    /** The control flow graph the basic block belongs to. */
    102     PDBGFCFGINT             pCfg;
     102    PDBGFFLOWINT             pFlow;
    103103    /** Reference counter. */
    104     uint32_t volatile       cRefs;
     104    uint32_t volatile        cRefs;
    105105    /** Basic block end type. */
    106     DBGFCFGBBENDTYPE        enmEndType;
     106    DBGFFLOWBBENDTYPE        enmEndType;
    107107    /** Start address of this basic block. */
    108     DBGFADDRESS             AddrStart;
     108    DBGFADDRESS              AddrStart;
    109109    /** End address of this basic block. */
    110     DBGFADDRESS             AddrEnd;
     110    DBGFADDRESS              AddrEnd;
    111111    /** Address of the block succeeding.
    112112     *  This is valid for conditional jumps
     
    114114     * unconditional jumps (not ret, iret, etc.) except
    115115     * if we can't infer the jump target (jmp *eax for example). */
    116     DBGFADDRESS             AddrTarget;
    117     /** Last status error code if DBGF_CFG_BB_F_INCOMPLETE_ERR is set. */
    118     int                     rcError;
    119     /** Error message if DBGF_CFG_BB_F_INCOMPLETE_ERR is set. */
    120     char                   *pszErr;
     116    DBGFADDRESS              AddrTarget;
     117    /** Last status error code if DBGF_FLOW_BB_F_INCOMPLETE_ERR is set. */
     118    int                      rcError;
     119    /** Error message if DBGF_FLOW_BB_F_INCOMPLETE_ERR is set. */
     120    char                     *pszErr;
    121121    /** Flags for this basic block. */
    122     uint32_t                fFlags;
     122    uint32_t                 fFlags;
    123123    /** Number of instructions in this basic block. */
    124     uint32_t                cInstr;
     124    uint32_t                 cInstr;
    125125    /** Maximum number of instruction records for this basic block. */
    126     uint32_t                cInstrMax;
     126    uint32_t                 cInstrMax;
    127127    /** Instruction records, variable in size. */
    128     DBGFCFGBBINSTR          aInstr[1];
    129 } DBGFCFGBBINT;
     128    DBGFFLOWBBINSTR          aInstr[1];
     129} DBGFFLOWBBINT;
    130130/** Pointer to an internal control flow graph basic block state. */
    131 typedef DBGFCFGBBINT *PDBGFCFGBBINT;
     131typedef DBGFFLOWBBINT *PDBGFFLOWBBINT;
    132132
    133133/**
    134134 * Control flow graph iterator state.
    135135 */
    136 typedef struct DBGFCFGITINT
     136typedef struct DBGFFLOWITINT
    137137{
    138138    /** Pointer to the control flow graph (holding a reference). */
    139     PDBGFCFGINT             pCfg;
     139    PDBGFFLOWINT             pFlow;
    140140    /** Next basic block to return. */
    141     uint32_t                idxBbNext;
     141    uint32_t                 idxBbNext;
    142142    /** Array of basic blocks sorted by the specified order - variable in size. */
    143     PDBGFCFGBBINT           apBb[1];
    144 } DBGFCFGITINT;
     143    PDBGFFLOWBBINT           apBb[1];
     144} DBGFFLOWITINT;
    145145/** Pointer to the internal control flow graph iterator state. */
    146 typedef DBGFCFGITINT *PDBGFCFGITINT;
    147 
    148 /**
    149  * Dumper state for a basic block.
    150  */
    151 typedef struct DBGFCFGDUMPBB
    152 {
    153     /** The basic block referenced. */
    154     PDBGFCFGBBINT           pCfgBb;
    155     /** Width of the basic block in chars. */
    156     uint32_t                cchWidth;
    157     /** Height of the basic block in chars. */
    158     uint32_t                cchHeight;
    159     /** X coordinate of the start. */
    160     uint32_t                uStartX;
    161     /** Y coordinate of the start. */
    162     uint32_t                uStartY;
    163 } DBGFCFGDUMPBB;
    164 /** Pointer to a basic block dumper state. */
    165 typedef DBGFCFGDUMPBB *PDBGFCFGDUMPBB;
    166 
    167 /**
    168  * Dumper ASCII screen.
    169  */
    170 typedef struct DBGFCFGDUMPSCREEN
    171 {
    172     /** Width of the screen. */
    173     uint32_t                cchWidth;
    174     /** Height of the screen. */
    175     uint32_t                cchHeight;
    176     /** Extra amount of characters at the end of each line (usually temrinator). */
    177     uint32_t                cchStride;
    178     /** Pointer to the char buffer. */
    179     char                   *pszScreen;
    180 } DBGFCFGDUMPSCREEN;
    181 /** Pointer to a dumper ASCII screen. */
    182 typedef DBGFCFGDUMPSCREEN *PDBGFCFGDUMPSCREEN;
     146typedef DBGFFLOWITINT *PDBGFFLOWITINT;
     147
    183148
    184149/*********************************************************************************************************************************
     
    186151*********************************************************************************************************************************/
    187152
    188 static uint32_t dbgfR3CfgBbReleaseInt(PDBGFCFGBBINT pCfgBb, bool fMayDestroyCfg);
     153static uint32_t dbgfR3FlowBbReleaseInt(PDBGFFLOWBBINT pFlowBb, bool fMayDestroyFlow);
    189154
    190155/**
     
    196161 * @param   cInstrMax           Maximum number of instructions this block can hold initially.
    197162 */
    198 static PDBGFCFGBBINT dbgfR3CfgBbCreate(PDBGFCFGINT pThis, PDBGFADDRESS pAddrStart, uint32_t cInstrMax)
    199 {
    200     PDBGFCFGBBINT pCfgBb = (PDBGFCFGBBINT)RTMemAllocZ(RT_OFFSETOF(DBGFCFGBBINT, aInstr[cInstrMax]));
    201     if (RT_LIKELY(pCfgBb))
    202     {
    203         RTListInit(&pCfgBb->NdCfgBb);
    204         pCfgBb->cRefs      = 1;
    205         pCfgBb->enmEndType = DBGFCFGBBENDTYPE_INVALID;
    206         pCfgBb->pCfg       = pThis;
    207         pCfgBb->fFlags     = DBGF_CFG_BB_F_EMPTY;
    208         pCfgBb->AddrStart  = *pAddrStart;
    209         pCfgBb->AddrEnd    = *pAddrStart;
    210         pCfgBb->rcError    = VINF_SUCCESS;
    211         pCfgBb->pszErr     = NULL;
    212         pCfgBb->cInstr     = 0;
    213         pCfgBb->cInstrMax  = cInstrMax;
     163static PDBGFFLOWBBINT dbgfR3FlowBbCreate(PDBGFFLOWINT pThis, PDBGFADDRESS pAddrStart, uint32_t cInstrMax)
     164{
     165    PDBGFFLOWBBINT pFlowBb = (PDBGFFLOWBBINT)RTMemAllocZ(RT_OFFSETOF(DBGFFLOWBBINT, aInstr[cInstrMax]));
     166    if (RT_LIKELY(pFlowBb))
     167    {
     168        RTListInit(&pFlowBb->NdFlowBb);
     169        pFlowBb->cRefs      = 1;
     170        pFlowBb->enmEndType = DBGFFLOWBBENDTYPE_INVALID;
     171        pFlowBb->pFlow       = pThis;
     172        pFlowBb->fFlags     = DBGF_FLOW_BB_F_EMPTY;
     173        pFlowBb->AddrStart  = *pAddrStart;
     174        pFlowBb->AddrEnd    = *pAddrStart;
     175        pFlowBb->rcError    = VINF_SUCCESS;
     176        pFlowBb->pszErr     = NULL;
     177        pFlowBb->cInstr     = 0;
     178        pFlowBb->cInstrMax  = cInstrMax;
    214179        ASMAtomicIncU32(&pThis->cRefsBb);
    215180    }
    216181
    217     return pCfgBb;
     182    return pFlowBb;
    218183}
    219184
     
    225190 * @param   pThis               The control flow graph to destroy.
    226191 */
    227 static void dbgfR3CfgDestroy(PDBGFCFGINT pThis)
     192static void dbgfR3FlowDestroy(PDBGFFLOWINT pThis)
    228193{
    229194    /* Defer destruction if there are still basic blocks referencing us. */
    230     PDBGFCFGBBINT pCfgBb = NULL;
    231     PDBGFCFGBBINT pCfgBbNext = NULL;
    232     RTListForEachSafe(&pThis->LstCfgBb, pCfgBb, pCfgBbNext, DBGFCFGBBINT, NdCfgBb)
    233     {
    234         dbgfR3CfgBbReleaseInt(pCfgBb, false /*fMayDestroyCfg*/);
     195    PDBGFFLOWBBINT pFlowBb = NULL;
     196    PDBGFFLOWBBINT pFlowBbNext = NULL;
     197    RTListForEachSafe(&pThis->LstFlowBb, pFlowBb, pFlowBbNext, DBGFFLOWBBINT, NdFlowBb)
     198    {
     199        dbgfR3FlowBbReleaseInt(pFlowBb, false /*fMayDestroyFlow*/);
    235200    }
    236201
     
    248213 *
    249214 * @returns nothing.
    250  * @param   pCfgBb              The basic block to destroy.
    251  * @param   fMayDestroyCfg      Flag whether the control flow graph container
    252  *                              should be destroyed when there is nothing referencing it.
    253  */
    254 static void dbgfR3CfgBbDestroy(PDBGFCFGBBINT pCfgBb, bool fMayDestroyCfg)
    255 {
    256     PDBGFCFGINT pThis = pCfgBb->pCfg;
    257 
    258     RTListNodeRemove(&pCfgBb->NdCfgBb);
     215 * @param   pFlowBb              The basic block to destroy.
     216 * @param   fMayDestroyFlow      Flag whether the control flow graph container
     217 *                               should be destroyed when there is nothing referencing it.
     218 */
     219static void dbgfR3FlowBbDestroy(PDBGFFLOWBBINT pFlowBb, bool fMayDestroyFlow)
     220{
     221    PDBGFFLOWINT pThis = pFlowBb->pFlow;
     222
     223    RTListNodeRemove(&pFlowBb->NdFlowBb);
    259224    pThis->cBbs--;
    260     for (uint32_t idxInstr = 0; idxInstr < pCfgBb->cInstr; idxInstr++)
    261         RTStrCacheRelease(pThis->hStrCacheInstr, pCfgBb->aInstr[idxInstr].pszInstr);
     225    for (uint32_t idxInstr = 0; idxInstr < pFlowBb->cInstr; idxInstr++)
     226        RTStrCacheRelease(pThis->hStrCacheInstr, pFlowBb->aInstr[idxInstr].pszInstr);
    262227    uint32_t cRefsBb = ASMAtomicDecU32(&pThis->cRefsBb);
    263     RTMemFree(pCfgBb);
    264 
    265     if (!cRefsBb && !pThis->cRefs && fMayDestroyCfg)
    266         dbgfR3CfgDestroy(pThis);
     228    RTMemFree(pFlowBb);
     229
     230    if (!cRefsBb && !pThis->cRefs && fMayDestroyFlow)
     231        dbgfR3FlowDestroy(pThis);
    267232}
    268233
     
    273238 * @returns New reference count of the released basic block, on 0
    274239 *          it is destroyed.
    275  * @param   pCfgBb              The basic block to release.
    276  * @param   fMayDestroyCfg      Flag whether the control flow graph container
    277  *                              should be destroyed when there is nothing referencing it.
    278  */
    279 static uint32_t dbgfR3CfgBbReleaseInt(PDBGFCFGBBINT pCfgBb, bool fMayDestroyCfg)
    280 {
    281     uint32_t cRefs = ASMAtomicDecU32(&pCfgBb->cRefs);
    282     AssertMsg(cRefs < _1M, ("%#x %p %d\n", cRefs, pCfgBb, pCfgBb->enmEndType));
     240 * @param   pFlowBb              The basic block to release.
     241 * @param   fMayDestroyFlow      Flag whether the control flow graph container
     242 *                               should be destroyed when there is nothing referencing it.
     243 */
     244static uint32_t dbgfR3FlowBbReleaseInt(PDBGFFLOWBBINT pFlowBb, bool fMayDestroyFlow)
     245{
     246    uint32_t cRefs = ASMAtomicDecU32(&pFlowBb->cRefs);
     247    AssertMsg(cRefs < _1M, ("%#x %p %d\n", cRefs, pFlowBb, pFlowBb->enmEndType));
    283248    if (cRefs == 0)
    284         dbgfR3CfgBbDestroy(pCfgBb, fMayDestroyCfg);
     249        dbgfR3FlowBbDestroy(pFlowBb, fMayDestroyFlow);
    285250    return cRefs;
    286251}
     
    292257 * @returns nothing.
    293258 * @param   pThis               The control flow graph to link into.
    294  * @param   pCfgBb              The basic block to link.
    295  */
    296 DECLINLINE(void) dbgfR3CfgLink(PDBGFCFGINT pThis, PDBGFCFGBBINT pCfgBb)
    297 {
    298     RTListAppend(&pThis->LstCfgBb, &pCfgBb->NdCfgBb);
     259 * @param   pFlowBb              The basic block to link.
     260 */
     261DECLINLINE(void) dbgfR3FlowLink(PDBGFFLOWINT pThis, PDBGFFLOWBBINT pFlowBb)
     262{
     263    RTListAppend(&pThis->LstFlowBb, &pFlowBb->NdFlowBb);
    299264    pThis->cBbs++;
    300265}
     
    307272 * @param   pThis               The control flow graph.
    308273 */
    309 DECLINLINE(PDBGFCFGBBINT) dbgfR3CfgGetUnpopulatedBb(PDBGFCFGINT pThis)
    310 {
    311     PDBGFCFGBBINT pCfgBb = NULL;
    312     RTListForEach(&pThis->LstCfgBb, pCfgBb, DBGFCFGBBINT, NdCfgBb)
    313     {
    314         if (pCfgBb->fFlags & DBGF_CFG_BB_F_EMPTY)
    315             return pCfgBb;
     274DECLINLINE(PDBGFFLOWBBINT) dbgfR3FlowGetUnpopulatedBb(PDBGFFLOWINT pThis)
     275{
     276    PDBGFFLOWBBINT pFlowBb = NULL;
     277    RTListForEach(&pThis->LstFlowBb, pFlowBb, DBGFFLOWBBINT, NdFlowBb)
     278    {
     279        if (pFlowBb->fFlags & DBGF_FLOW_BB_F_EMPTY)
     280            return pFlowBb;
    316281    }
    317282
     
    333298 * @param   pAddrJmpTarget      Where to store the address to the jump target on success.
    334299 */
    335 static int dbgfR3CfgQueryJmpTarget(PUVM pUVM, VMCPUID idCpu, PDISOPPARAM pDisParam, PDBGFADDRESS pAddrInstr,
     300static int dbgfR3FlowQueryJmpTarget(PUVM pUVM, VMCPUID idCpu, PDISOPPARAM pDisParam, PDBGFADDRESS pAddrInstr,
    336301                                   uint32_t cbInstr, bool fRelJmp, PDBGFADDRESS pAddrJmpTarget)
    337302{
     
    385350 * @param   pAddr2              Second address.
    386351 */
    387 static bool dbgfR3CfgBbAddrEqual(PDBGFADDRESS pAddr1, PDBGFADDRESS pAddr2)
     352static bool dbgfR3FlowBbAddrEqual(PDBGFADDRESS pAddr1, PDBGFADDRESS pAddr2)
    388353{
    389354    return    pAddr1->Sel == pAddr2->Sel
     
    399364 * @param   pAddr2              Second address.
    400365 */
    401 static bool dbgfR3CfgBbAddrLower(PDBGFADDRESS pAddr1, PDBGFADDRESS pAddr2)
     366static bool dbgfR3FlowBbAddrLower(PDBGFADDRESS pAddr1, PDBGFADDRESS pAddr2)
    402367{
    403368    return    pAddr1->Sel == pAddr2->Sel
     
    410375 *
    411376 * @returns true if they intersect, false otherwise.
    412  * @param   pCfgBb              The basic block to check.
     377 * @param   pFlowBb              The basic block to check.
    413378 * @param   pAddr               The address to check for.
    414379 */
    415 static bool dbgfR3CfgBbAddrIntersect(PDBGFCFGBBINT pCfgBb, PDBGFADDRESS pAddr)
    416 {
    417     return    (pCfgBb->AddrStart.Sel == pAddr->Sel)
    418            && (pCfgBb->AddrStart.off <= pAddr->off)
    419            && (pCfgBb->AddrEnd.off >= pAddr->off);
     380static bool dbgfR3FlowBbAddrIntersect(PDBGFFLOWBBINT pFlowBb, PDBGFADDRESS pAddr)
     381{
     382    return    (pFlowBb->AddrStart.Sel == pAddr->Sel)
     383           && (pFlowBb->AddrStart.off <= pAddr->off)
     384           && (pFlowBb->AddrEnd.off >= pAddr->off);
    420385}
    421386
     
    429394 * @param   pAddr               The address to check for.
    430395 */
    431 static bool dbgfR3CfgHasBbWithStartAddr(PDBGFCFGINT pThis, PDBGFADDRESS pAddr)
    432 {
    433     PDBGFCFGBBINT pCfgBb = NULL;
    434     RTListForEach(&pThis->LstCfgBb, pCfgBb, DBGFCFGBBINT, NdCfgBb)
    435     {
    436         if (dbgfR3CfgBbAddrEqual(&pCfgBb->AddrStart, pAddr))
     396static bool dbgfR3FlowHasBbWithStartAddr(PDBGFFLOWINT pThis, PDBGFADDRESS pAddr)
     397{
     398    PDBGFFLOWBBINT pFlowBb = NULL;
     399    RTListForEach(&pThis->LstFlowBb, pFlowBb, DBGFFLOWBBINT, NdFlowBb)
     400    {
     401        if (dbgfR3FlowBbAddrEqual(&pFlowBb->AddrStart, pAddr))
    437402            return true;
    438403    }
     
    445410 * @returns VBox status code.
    446411 * @param   pThis               The control flow graph.
    447  * @param   pCfgBb              The basic block to split.
     412 * @param   pFlowBb              The basic block to split.
    448413 * @param   pAddr               The address to split at.
    449414 */
    450 static int dbgfR3CfgBbSplit(PDBGFCFGINT pThis, PDBGFCFGBBINT pCfgBb, PDBGFADDRESS pAddr)
     415static int dbgfR3FlowBbSplit(PDBGFFLOWINT pThis, PDBGFFLOWBBINT pFlowBb, PDBGFADDRESS pAddr)
    451416{
    452417    int rc = VINF_SUCCESS;
     
    455420    /* If the block is empty it will get populated later so there is nothing to split,
    456421     * same if the start address equals. */
    457     if (   pCfgBb->fFlags & DBGF_CFG_BB_F_EMPTY
    458         || dbgfR3CfgBbAddrEqual(&pCfgBb->AddrStart, pAddr))
     422    if (   pFlowBb->fFlags & DBGF_FLOW_BB_F_EMPTY
     423        || dbgfR3FlowBbAddrEqual(&pFlowBb->AddrStart, pAddr))
    459424        return VINF_SUCCESS;
    460425
    461426    /* Find the instruction to split at. */
    462     for (idxInstrSplit = 1; idxInstrSplit < pCfgBb->cInstr; idxInstrSplit++)
    463         if (dbgfR3CfgBbAddrEqual(&pCfgBb->aInstr[idxInstrSplit].AddrInstr, pAddr))
     427    for (idxInstrSplit = 1; idxInstrSplit < pFlowBb->cInstr; idxInstrSplit++)
     428        if (dbgfR3FlowBbAddrEqual(&pFlowBb->aInstr[idxInstrSplit].AddrInstr, pAddr))
    464429            break;
    465430
     
    470435     * so far and results in an error.
    471436     */
    472     if (idxInstrSplit < pCfgBb->cInstr)
     437    if (idxInstrSplit < pFlowBb->cInstr)
    473438    {
    474439        /* Create new basic block. */
    475         uint32_t cInstrNew = pCfgBb->cInstr - idxInstrSplit;
    476         PDBGFCFGBBINT pCfgBbNew = dbgfR3CfgBbCreate(pThis, &pCfgBb->aInstr[idxInstrSplit].AddrInstr,
     440        uint32_t cInstrNew = pFlowBb->cInstr - idxInstrSplit;
     441        PDBGFFLOWBBINT pFlowBbNew = dbgfR3FlowBbCreate(pThis, &pFlowBb->aInstr[idxInstrSplit].AddrInstr,
    477442                                                    cInstrNew);
    478         if (pCfgBbNew)
     443        if (pFlowBbNew)
    479444        {
    480445            /* Move instructions over. */
    481             pCfgBbNew->cInstr     = cInstrNew;
    482             pCfgBbNew->AddrEnd    = pCfgBb->AddrEnd;
    483             pCfgBbNew->enmEndType = pCfgBb->enmEndType;
    484             pCfgBbNew->fFlags     = pCfgBb->fFlags & ~DBGF_CFG_BB_F_ENTRY;
     446            pFlowBbNew->cInstr     = cInstrNew;
     447            pFlowBbNew->AddrEnd    = pFlowBb->AddrEnd;
     448            pFlowBbNew->enmEndType = pFlowBb->enmEndType;
     449            pFlowBbNew->fFlags     = pFlowBb->fFlags & ~DBGF_FLOW_BB_F_ENTRY;
    485450
    486451            /* Move any error to the new basic block and clear them in the old basic block. */
    487             pCfgBbNew->rcError    = pCfgBb->rcError;
    488             pCfgBbNew->pszErr     = pCfgBb->pszErr;
    489             pCfgBb->rcError       = VINF_SUCCESS;
    490             pCfgBb->pszErr        = NULL;
    491             pCfgBb->fFlags       &= ~DBGF_CFG_BB_F_INCOMPLETE_ERR;
    492 
    493             memcpy(&pCfgBbNew->aInstr[0], &pCfgBb->aInstr[idxInstrSplit], cInstrNew * sizeof(DBGFCFGBBINSTR));
    494             pCfgBb->cInstr     = idxInstrSplit;
    495             pCfgBb->enmEndType = DBGFCFGBBENDTYPE_UNCOND;
    496             pCfgBb->AddrEnd    = pCfgBb->aInstr[idxInstrSplit-1].AddrInstr;
    497             pCfgBb->AddrTarget = pCfgBbNew->AddrStart;
    498             DBGFR3AddrAdd(&pCfgBb->AddrEnd, pCfgBb->aInstr[idxInstrSplit-1].cbInstr - 1);
    499             RT_BZERO(&pCfgBb->aInstr[idxInstrSplit], cInstrNew * sizeof(DBGFCFGBBINSTR));
    500 
    501             dbgfR3CfgLink(pThis, pCfgBbNew);
     452            pFlowBbNew->rcError    = pFlowBb->rcError;
     453            pFlowBbNew->pszErr     = pFlowBb->pszErr;
     454            pFlowBb->rcError       = VINF_SUCCESS;
     455            pFlowBb->pszErr        = NULL;
     456            pFlowBb->fFlags       &= ~DBGF_FLOW_BB_F_INCOMPLETE_ERR;
     457
     458            memcpy(&pFlowBbNew->aInstr[0], &pFlowBb->aInstr[idxInstrSplit], cInstrNew * sizeof(DBGFFLOWBBINSTR));
     459            pFlowBb->cInstr     = idxInstrSplit;
     460            pFlowBb->enmEndType = DBGFFLOWBBENDTYPE_UNCOND;
     461            pFlowBb->AddrEnd    = pFlowBb->aInstr[idxInstrSplit-1].AddrInstr;
     462            pFlowBb->AddrTarget = pFlowBbNew->AddrStart;
     463            DBGFR3AddrAdd(&pFlowBb->AddrEnd, pFlowBb->aInstr[idxInstrSplit-1].cbInstr - 1);
     464            RT_BZERO(&pFlowBb->aInstr[idxInstrSplit], cInstrNew * sizeof(DBGFFLOWBBINSTR));
     465
     466            dbgfR3FlowLink(pThis, pFlowBbNew);
    502467        }
    503468        else
     
    519484 * @param   pAddrSucc           The guest address the new successor should start at.
    520485 */
    521 static int dbgfR3CfgBbSuccessorAdd(PDBGFCFGINT pThis, PDBGFADDRESS pAddrSucc)
    522 {
    523     PDBGFCFGBBINT pCfgBb = NULL;
    524     RTListForEach(&pThis->LstCfgBb, pCfgBb, DBGFCFGBBINT, NdCfgBb)
     486static int dbgfR3FlowBbSuccessorAdd(PDBGFFLOWINT pThis, PDBGFADDRESS pAddrSucc)
     487{
     488    PDBGFFLOWBBINT pFlowBb = NULL;
     489    RTListForEach(&pThis->LstFlowBb, pFlowBb, DBGFFLOWBBINT, NdFlowBb)
    525490    {
    526491        /*
     
    528493         * and the start address does not equal the given one.
    529494         */
    530         if (dbgfR3CfgBbAddrIntersect(pCfgBb, pAddrSucc))
    531             return dbgfR3CfgBbSplit(pThis, pCfgBb, pAddrSucc);
     495        if (dbgfR3FlowBbAddrIntersect(pFlowBb, pAddrSucc))
     496            return dbgfR3FlowBbSplit(pThis, pFlowBb, pAddrSucc);
    532497    }
    533498
    534499    int rc = VINF_SUCCESS;
    535     pCfgBb = dbgfR3CfgBbCreate(pThis, pAddrSucc, 10);
    536     if (pCfgBb)
    537         dbgfR3CfgLink(pThis, pCfgBb);
     500    pFlowBb = dbgfR3FlowBbCreate(pThis, pAddrSucc, 10);
     501    if (pFlowBb)
     502        dbgfR3FlowLink(pThis, pFlowBb);
    538503    else
    539504        rc = VERR_NO_MEMORY;
     
    547512 *
    548513 * @returns nothing.
    549  * @param   pCfgBb              The basic block causing the error.
     514 * @param   pFlowBb              The basic block causing the error.
    550515 * @param   rcError             The error to set.
    551516 * @param   pszFmt              Format string of the error description.
    552517 * @param   ...                 Arguments for the format string.
    553518 */
    554 static void dbgfR3CfgBbSetError(PDBGFCFGBBINT pCfgBb, int rcError, const char *pszFmt, ...)
     519static void dbgfR3FlowBbSetError(PDBGFFLOWBBINT pFlowBb, int rcError, const char *pszFmt, ...)
    555520{
    556521    va_list va;
    557522    va_start(va, pszFmt);
    558523
    559     Assert(!(pCfgBb->fFlags & DBGF_CFG_BB_F_INCOMPLETE_ERR));
    560     pCfgBb->fFlags |= DBGF_CFG_BB_F_INCOMPLETE_ERR;
    561     pCfgBb->fFlags &= ~DBGF_CFG_BB_F_EMPTY;
    562     pCfgBb->rcError = rcError;
    563     pCfgBb->pszErr = RTStrAPrintf2V(pszFmt, va);
     524    Assert(!(pFlowBb->fFlags & DBGF_FLOW_BB_F_INCOMPLETE_ERR));
     525    pFlowBb->fFlags |= DBGF_FLOW_BB_F_INCOMPLETE_ERR;
     526    pFlowBb->fFlags &= ~DBGF_FLOW_BB_F_EMPTY;
     527    pFlowBb->rcError = rcError;
     528    pFlowBb->pszErr = RTStrAPrintf2V(pszFmt, va);
    564529    va_end(va);
    565530}
     
    573538 * @param   idCpu               CPU id for disassembling.
    574539 * @param   pThis               The control flow graph to populate.
    575  * @param   pCfgBb              The basic block to fill.
     540 * @param   pFlowBb              The basic block to fill.
    576541 * @param   cbDisasmMax         The maximum amount to disassemble.
    577542 * @param   fFlags              Combination of DBGF_DISAS_FLAGS_*.
    578543 */
    579 static int dbgfR3CfgBbProcess(PUVM pUVM, VMCPUID idCpu, PDBGFCFGINT pThis, PDBGFCFGBBINT pCfgBb,
     544static int dbgfR3FlowBbProcess(PUVM pUVM, VMCPUID idCpu, PDBGFFLOWINT pThis, PDBGFFLOWBBINT pFlowBb,
    580545                              uint32_t cbDisasmMax, uint32_t fFlags)
    581546{
    582547    int rc = VINF_SUCCESS;
    583548    uint32_t cbDisasmLeft = cbDisasmMax ? cbDisasmMax : UINT32_MAX;
    584     DBGFADDRESS AddrDisasm = pCfgBb->AddrEnd;
    585 
    586     Assert(pCfgBb->fFlags & DBGF_CFG_BB_F_EMPTY);
     549    DBGFADDRESS AddrDisasm = pFlowBb->AddrEnd;
     550
     551    Assert(pFlowBb->fFlags & DBGF_FLOW_BB_F_EMPTY);
    587552
    588553    /*
     
    600565         * to another basic block and stop here.
    601566         */
    602         if (   !(pCfgBb->fFlags & DBGF_CFG_BB_F_EMPTY)
    603             && dbgfR3CfgHasBbWithStartAddr(pThis, &AddrDisasm))
     567        if (   !(pFlowBb->fFlags & DBGF_FLOW_BB_F_EMPTY)
     568            && dbgfR3FlowHasBbWithStartAddr(pThis, &AddrDisasm))
    604569        {
    605             pCfgBb->AddrTarget = AddrDisasm;
    606             pCfgBb->enmEndType = DBGFCFGBBENDTYPE_UNCOND;
     570            pFlowBb->AddrTarget = AddrDisasm;
     571            pFlowBb->enmEndType = DBGFFLOWBBENDTYPE_UNCOND;
    607572            break;
    608573        }
    609574
    610         pCfgBb->fFlags &= ~DBGF_CFG_BB_F_EMPTY;
     575        pFlowBb->fFlags &= ~DBGF_FLOW_BB_F_EMPTY;
    611576
    612577        rc = dbgfR3DisasInstrStateEx(pUVM, idCpu, &AddrDisasm, fFlags,
     
    616581            cbDisasmLeft -= DisState.cbInstr;
    617582
    618             if (pCfgBb->cInstr == pCfgBb->cInstrMax)
     583            if (pFlowBb->cInstr == pFlowBb->cInstrMax)
    619584            {
    620585                /* Reallocate. */
    621                 RTListNodeRemove(&pCfgBb->NdCfgBb);
    622                 PDBGFCFGBBINT pCfgBbNew = (PDBGFCFGBBINT)RTMemRealloc(pCfgBb, RT_OFFSETOF(DBGFCFGBBINT, aInstr[pCfgBb->cInstrMax + 10]));
    623                 if (pCfgBbNew)
     586                RTListNodeRemove(&pFlowBb->NdFlowBb);
     587                PDBGFFLOWBBINT pFlowBbNew = (PDBGFFLOWBBINT)RTMemRealloc(pFlowBb, RT_OFFSETOF(DBGFFLOWBBINT, aInstr[pFlowBb->cInstrMax + 10]));
     588                if (pFlowBbNew)
    624589                {
    625                     pCfgBbNew->cInstrMax += 10;
    626                     pCfgBb = pCfgBbNew;
     590                    pFlowBbNew->cInstrMax += 10;
     591                    pFlowBb = pFlowBbNew;
    627592                }
    628593                else
    629594                    rc = VERR_NO_MEMORY;
    630                 RTListAppend(&pThis->LstCfgBb, &pCfgBb->NdCfgBb);
     595                RTListAppend(&pThis->LstFlowBb, &pFlowBb->NdFlowBb);
    631596            }
    632597
    633598            if (RT_SUCCESS(rc))
    634599            {
    635                 PDBGFCFGBBINSTR pInstr = &pCfgBb->aInstr[pCfgBb->cInstr];
     600                PDBGFFLOWBBINSTR pInstr = &pFlowBb->aInstr[pFlowBb->cInstr];
    636601
    637602                pInstr->AddrInstr = AddrDisasm;
    638603                pInstr->cbInstr   = DisState.cbInstr;
    639604                pInstr->pszInstr  = RTStrCacheEnter(pThis->hStrCacheInstr, &szOutput[0]);
    640                 pCfgBb->cInstr++;
    641 
    642                 pCfgBb->AddrEnd = AddrDisasm;
    643                 DBGFR3AddrAdd(&pCfgBb->AddrEnd, pInstr->cbInstr - 1);
     605                pFlowBb->cInstr++;
     606
     607                pFlowBb->AddrEnd = AddrDisasm;
     608                DBGFR3AddrAdd(&pFlowBb->AddrEnd, pInstr->cbInstr - 1);
    644609                DBGFR3AddrAdd(&AddrDisasm, pInstr->cbInstr);
    645610
     
    654619                    if (   uOpc == OP_RETN || uOpc == OP_RETF || uOpc == OP_IRET
    655620                        || uOpc == OP_SYSEXIT || uOpc == OP_SYSRET)
    656                         pCfgBb->enmEndType = DBGFCFGBBENDTYPE_EXIT;
     621                        pFlowBb->enmEndType = DBGFFLOWBBENDTYPE_EXIT;
    657622                    else if (uOpc == OP_JMP)
    658623                    {
    659624                        Assert(DisState.pCurInstr->fOpType & DISOPTYPE_UNCOND_CONTROLFLOW);
    660                         pCfgBb->enmEndType = DBGFCFGBBENDTYPE_UNCOND_JMP;
     625                        pFlowBb->enmEndType = DBGFFLOWBBENDTYPE_UNCOND_JMP;
    661626
    662627                        /* Create one new basic block with the jump target address. */
    663                         rc = dbgfR3CfgQueryJmpTarget(pUVM, idCpu, &DisState.Param1, &pInstr->AddrInstr, pInstr->cbInstr,
     628                        rc = dbgfR3FlowQueryJmpTarget(pUVM, idCpu, &DisState.Param1, &pInstr->AddrInstr, pInstr->cbInstr,
    664629                                                     RT_BOOL(DisState.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW),
    665                                                      &pCfgBb->AddrTarget);
     630                                                     &pFlowBb->AddrTarget);
    666631                        if (RT_SUCCESS(rc))
    667                             rc = dbgfR3CfgBbSuccessorAdd(pThis, &pCfgBb->AddrTarget);
     632                            rc = dbgfR3FlowBbSuccessorAdd(pThis, &pFlowBb->AddrTarget);
    668633                    }
    669634                    else if (uOpc != OP_CALL)
    670635                    {
    671636                        Assert(DisState.pCurInstr->fOpType & DISOPTYPE_COND_CONTROLFLOW);
    672                         pCfgBb->enmEndType = DBGFCFGBBENDTYPE_COND;
     637                        pFlowBb->enmEndType = DBGFFLOWBBENDTYPE_COND;
    673638
    674639                        /*
     
    676641                         * and one starting after the current instruction.
    677642                         */
    678                         rc = dbgfR3CfgBbSuccessorAdd(pThis, &AddrDisasm);
     643                        rc = dbgfR3FlowBbSuccessorAdd(pThis, &AddrDisasm);
    679644                        if (RT_SUCCESS(rc))
    680645                        {
    681                             rc = dbgfR3CfgQueryJmpTarget(pUVM, idCpu, &DisState.Param1, &pInstr->AddrInstr, pInstr->cbInstr,
     646                            rc = dbgfR3FlowQueryJmpTarget(pUVM, idCpu, &DisState.Param1, &pInstr->AddrInstr, pInstr->cbInstr,
    682647                                                         RT_BOOL(DisState.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW),
    683                                                          &pCfgBb->AddrTarget);
     648                                                         &pFlowBb->AddrTarget);
    684649                            if (RT_SUCCESS(rc))
    685                                 rc = dbgfR3CfgBbSuccessorAdd(pThis, &pCfgBb->AddrTarget);
     650                                rc = dbgfR3FlowBbSuccessorAdd(pThis, &pFlowBb->AddrTarget);
    686651                        }
    687652                    }
    688653
    689654                    if (RT_FAILURE(rc))
    690                         dbgfR3CfgBbSetError(pCfgBb, rc, "Adding successor blocks failed with %Rrc", rc);
     655                        dbgfR3FlowBbSetError(pFlowBb, rc, "Adding successor blocks failed with %Rrc", rc);
    691656
    692657                    /* Quit disassembling. */
     
    697662            }
    698663            else
    699                 dbgfR3CfgBbSetError(pCfgBb, rc, "Increasing basic block failed with %Rrc", rc);
     664                dbgfR3FlowBbSetError(pFlowBb, rc, "Increasing basic block failed with %Rrc", rc);
    700665        }
    701666        else
    702             dbgfR3CfgBbSetError(pCfgBb, rc, "Disassembling the instruction failed with %Rrc", rc);
     667            dbgfR3FlowBbSetError(pFlowBb, rc, "Disassembling the instruction failed with %Rrc", rc);
    703668    }
    704669
     
    717682 * @param   fFlags              Combination of DBGF_DISAS_FLAGS_*.
    718683 */
    719 static int dbgfR3CfgPopulate(PUVM pUVM, VMCPUID idCpu, PDBGFCFGINT pThis, PDBGFADDRESS pAddrStart,
     684static int dbgfR3FlowPopulate(PUVM pUVM, VMCPUID idCpu, PDBGFFLOWINT pThis, PDBGFADDRESS pAddrStart,
    720685                             uint32_t cbDisasmMax, uint32_t fFlags)
    721686{
    722687    int rc = VINF_SUCCESS;
    723     PDBGFCFGBBINT pCfgBb = dbgfR3CfgGetUnpopulatedBb(pThis);
     688    PDBGFFLOWBBINT pFlowBb = dbgfR3FlowGetUnpopulatedBb(pThis);
    724689    DBGFADDRESS AddrEnd = *pAddrStart;
    725690    DBGFR3AddrAdd(&AddrEnd, cbDisasmMax);
    726691
    727     while (VALID_PTR(pCfgBb))
    728     {
    729         rc = dbgfR3CfgBbProcess(pUVM, idCpu, pThis, pCfgBb, cbDisasmMax, fFlags);
     692    while (VALID_PTR(pFlowBb))
     693    {
     694        rc = dbgfR3FlowBbProcess(pUVM, idCpu, pThis, pFlowBb, cbDisasmMax, fFlags);
    730695        if (RT_FAILURE(rc))
    731696            break;
    732697
    733         pCfgBb = dbgfR3CfgGetUnpopulatedBb(pThis);
     698        pFlowBb = dbgfR3FlowGetUnpopulatedBb(pThis);
    734699    }
    735700
     
    746711 * @param   cbDisasmMax         Limit the amount of bytes to disassemble, 0 for no limit.
    747712 * @param   fFlags              Combination of DBGF_DISAS_FLAGS_*.
    748  * @param   phCfg               Where to store the handle to the control flow graph on success.
    749  */
    750 VMMR3DECL(int) DBGFR3CfgCreate(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddressStart, uint32_t cbDisasmMax,
    751                                uint32_t fFlags, PDBGFCFG phCfg)
     713 * @param   phFlow              Where to store the handle to the control flow graph on success.
     714 */
     715VMMR3DECL(int) DBGFR3FlowCreate(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddressStart, uint32_t cbDisasmMax,
     716                               uint32_t fFlags, PDBGFFLOW phFlow)
    752717{
    753718    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
     
    761726    /* Create the control flow graph container. */
    762727    int rc = VINF_SUCCESS;
    763     PDBGFCFGINT pThis = (PDBGFCFGINT)RTMemAllocZ(sizeof(DBGFCFGINT));
     728    PDBGFFLOWINT pThis = (PDBGFFLOWINT)RTMemAllocZ(sizeof(DBGFFLOWINT));
    764729    if (RT_LIKELY(pThis))
    765730    {
    766         rc = RTStrCacheCreate(&pThis->hStrCacheInstr, "DBGFCFG");
     731        rc = RTStrCacheCreate(&pThis->hStrCacheInstr, "DBGFFLOW");
    767732        if (RT_SUCCESS(rc))
    768733        {
     
    770735            pThis->cRefsBb = 0;
    771736            pThis->cBbs    = 0;
    772             RTListInit(&pThis->LstCfgBb);
     737            RTListInit(&pThis->LstFlowBb);
    773738            /* Create the entry basic block and start the work. */
    774739
    775             PDBGFCFGBBINT pCfgBb = dbgfR3CfgBbCreate(pThis, pAddressStart, 10);
    776             if (RT_LIKELY(pCfgBb))
     740            PDBGFFLOWBBINT pFlowBb = dbgfR3FlowBbCreate(pThis, pAddressStart, 10);
     741            if (RT_LIKELY(pFlowBb))
    777742            {
    778                 pCfgBb->fFlags |= DBGF_CFG_BB_F_ENTRY;
    779                 dbgfR3CfgLink(pThis, pCfgBb);
    780                 rc = dbgfR3CfgPopulate(pUVM, idCpu, pThis, pAddressStart, cbDisasmMax, fFlags);
     743                pFlowBb->fFlags |= DBGF_FLOW_BB_F_ENTRY;
     744                dbgfR3FlowLink(pThis, pFlowBb);
     745                rc = dbgfR3FlowPopulate(pUVM, idCpu, pThis, pAddressStart, cbDisasmMax, fFlags);
    781746                if (RT_SUCCESS(rc))
    782747                {
    783                     *phCfg = pThis;
     748                    *phFlow = pThis;
    784749                    return VINF_SUCCESS;
    785750                }
     
    790755
    791756        ASMAtomicDecU32(&pThis->cRefs);
    792         dbgfR3CfgDestroy(pThis);
     757        dbgfR3FlowDestroy(pThis);
    793758    }
    794759    else
     
    803768 *
    804769 * @returns Current reference count.
    805  * @param   hCfg                The control flow graph handle to retain.
    806  */
    807 VMMR3DECL(uint32_t) DBGFR3CfgRetain(DBGFCFG hCfg)
    808 {
    809     PDBGFCFGINT pThis = hCfg;
     770 * @param   hFlow                The control flow graph handle to retain.
     771 */
     772VMMR3DECL(uint32_t) DBGFR3FlowRetain(DBGFFLOW hFlow)
     773{
     774    PDBGFFLOWINT pThis = hFlow;
    810775    AssertPtrReturn(pThis, UINT32_MAX);
    811776
     
    820785 *
    821786 * @returns Current reference count, on 0 the control flow graph will be destroyed.
    822  * @param   hCfg                The control flow graph handle to release.
    823  */
    824 VMMR3DECL(uint32_t) DBGFR3CfgRelease(DBGFCFG hCfg)
    825 {
    826     PDBGFCFGINT pThis = hCfg;
     787 * @param   hFlow                The control flow graph handle to release.
     788 */
     789VMMR3DECL(uint32_t) DBGFR3FlowRelease(DBGFFLOW hFlow)
     790{
     791    PDBGFFLOWINT pThis = hFlow;
    827792    if (!pThis)
    828793        return 0;
     
    832797    AssertMsg(cRefs < _1M, ("%#x %p\n", cRefs, pThis));
    833798    if (cRefs == 0)
    834         dbgfR3CfgDestroy(pThis);
     799        dbgfR3FlowDestroy(pThis);
    835800    return cRefs;
    836801}
     
    841806 *
    842807 * @returns VBox status code.
    843  * @param   hCfg                The control flow graph handle.
    844  * @param   phCfgBb             Where to store the basic block handle on success.
    845  */
    846 VMMR3DECL(int) DBGFR3CfgQueryStartBb(DBGFCFG hCfg, PDBGFCFGBB phCfgBb)
    847 {
    848     PDBGFCFGINT pThis = hCfg;
     808 * @param   hFlow                The control flow graph handle.
     809 * @param   phFlowBb             Where to store the basic block handle on success.
     810 */
     811VMMR3DECL(int) DBGFR3FlowQueryStartBb(DBGFFLOW hFlow, PDBGFFLOWBB phFlowBb)
     812{
     813    PDBGFFLOWINT pThis = hFlow;
    849814    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    850815
    851     PDBGFCFGBBINT pCfgBb = NULL;
    852     RTListForEach(&pThis->LstCfgBb, pCfgBb, DBGFCFGBBINT, NdCfgBb)
    853     {
    854         if (pCfgBb->fFlags & DBGF_CFG_BB_F_ENTRY)
     816    PDBGFFLOWBBINT pFlowBb = NULL;
     817    RTListForEach(&pThis->LstFlowBb, pFlowBb, DBGFFLOWBBINT, NdFlowBb)
     818    {
     819        if (pFlowBb->fFlags & DBGF_FLOW_BB_F_ENTRY)
    855820        {
    856             *phCfgBb = pCfgBb;
     821            *phFlowBb = pFlowBb;
    857822            return VINF_SUCCESS;
    858823        }
     
    870835 * @returns VBox status code.
    871836 * @retval  VERR_NOT_FOUND if there is no basic block intersecting with the address.
    872  * @param   hCfg                The control flow graph handle.
     837 * @param   hFlow                The control flow graph handle.
    873838 * @param   pAddr               The address to look for.
    874  * @param   phCfgBb             Where to store the basic block handle on success.
    875  */
    876 VMMR3DECL(int) DBGFR3CfgQueryBbByAddress(DBGFCFG hCfg, PDBGFADDRESS pAddr, PDBGFCFGBB phCfgBb)
    877 {
    878     PDBGFCFGINT pThis = hCfg;
     839 * @param   phFlowBb             Where to store the basic block handle on success.
     840 */
     841VMMR3DECL(int) DBGFR3FlowQueryBbByAddress(DBGFFLOW hFlow, PDBGFADDRESS pAddr, PDBGFFLOWBB phFlowBb)
     842{
     843    PDBGFFLOWINT pThis = hFlow;
    879844    AssertPtrReturn(pThis, VERR_INVALID_HANDLE);
    880     AssertPtrReturn(phCfgBb, VERR_INVALID_POINTER);
    881 
    882     PDBGFCFGBBINT pCfgBb = NULL;
    883     RTListForEach(&pThis->LstCfgBb, pCfgBb, DBGFCFGBBINT, NdCfgBb)
    884     {
    885         if (dbgfR3CfgBbAddrIntersect(pCfgBb, pAddr))
     845    AssertPtrReturn(phFlowBb, VERR_INVALID_POINTER);
     846
     847    PDBGFFLOWBBINT pFlowBb = NULL;
     848    RTListForEach(&pThis->LstFlowBb, pFlowBb, DBGFFLOWBBINT, NdFlowBb)
     849    {
     850        if (dbgfR3FlowBbAddrIntersect(pFlowBb, pAddr))
    886851        {
    887             DBGFR3CfgBbRetain(pCfgBb);
    888             *phCfgBb = pCfgBb;
     852            DBGFR3FlowBbRetain(pFlowBb);
     853            *phFlowBb = pFlowBb;
    889854            return VINF_SUCCESS;
    890855        }
     
    899864 *
    900865 * @returns Number of basic blocks.
    901  * @param   hCfg                The control flow graph handle.
    902  */
    903 VMMR3DECL(uint32_t) DBGFR3CfgGetBbCount(DBGFCFG hCfg)
    904 {
    905     PDBGFCFGINT pThis = hCfg;
     866 * @param   hFlow                The control flow graph handle.
     867 */
     868VMMR3DECL(uint32_t) DBGFR3FlowGetBbCount(DBGFFLOW hFlow)
     869{
     870    PDBGFFLOWINT pThis = hFlow;
    906871    AssertPtrReturn(pThis, 0);
    907872
     
    914879 *
    915880 * @returns Current reference count.
    916  * @param   hCfgBb              The basic block handle to retain.
    917  */
    918 VMMR3DECL(uint32_t) DBGFR3CfgBbRetain(DBGFCFGBB hCfgBb)
    919 {
    920     PDBGFCFGBBINT pCfgBb = hCfgBb;
    921     AssertPtrReturn(pCfgBb, UINT32_MAX);
    922 
    923     uint32_t cRefs = ASMAtomicIncU32(&pCfgBb->cRefs);
    924     AssertMsg(cRefs > 1 && cRefs < _1M, ("%#x %p %d\n", cRefs, pCfgBb, pCfgBb->enmEndType));
     881 * @param   hFlowBb              The basic block handle to retain.
     882 */
     883VMMR3DECL(uint32_t) DBGFR3FlowBbRetain(DBGFFLOWBB hFlowBb)
     884{
     885    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     886    AssertPtrReturn(pFlowBb, UINT32_MAX);
     887
     888    uint32_t cRefs = ASMAtomicIncU32(&pFlowBb->cRefs);
     889    AssertMsg(cRefs > 1 && cRefs < _1M, ("%#x %p %d\n", cRefs, pFlowBb, pFlowBb->enmEndType));
    925890    return cRefs;
    926891}
     
    931896 *
    932897 * @returns Current reference count, on 0 the basic block will be destroyed.
    933  * @param   hCfgBb              The basic block handle to release.
    934  */
    935 VMMR3DECL(uint32_t) DBGFR3CfgBbRelease(DBGFCFGBB hCfgBb)
    936 {
    937     PDBGFCFGBBINT pCfgBb = hCfgBb;
    938     if (!pCfgBb)
     898 * @param   hFlowBb              The basic block handle to release.
     899 */
     900VMMR3DECL(uint32_t) DBGFR3FlowBbRelease(DBGFFLOWBB hFlowBb)
     901{
     902    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     903    if (!pFlowBb)
    939904        return 0;
    940905
    941     return dbgfR3CfgBbReleaseInt(pCfgBb, true /* fMayDestroyCfg */);
     906    return dbgfR3FlowBbReleaseInt(pFlowBb, true /* fMayDestroyFlow */);
    942907}
    943908
     
    947912 *
    948913 * @returns Pointer to DBGF adress containing the start address of the basic block.
    949  * @param   hCfgBb              The basic block handle.
     914 * @param   hFlowBb              The basic block handle.
    950915 * @param   pAddrStart          Where to store the start address of the basic block.
    951916 */
    952 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetStartAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrStart)
    953 {
    954     PDBGFCFGBBINT pCfgBb = hCfgBb;
    955     AssertPtrReturn(pCfgBb, NULL);
     917VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetStartAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrStart)
     918{
     919    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     920    AssertPtrReturn(pFlowBb, NULL);
    956921    AssertPtrReturn(pAddrStart, NULL);
    957922
    958     *pAddrStart = pCfgBb->AddrStart;
     923    *pAddrStart = pFlowBb->AddrStart;
    959924    return pAddrStart;
    960925}
     
    965930 *
    966931 * @returns Pointer to DBGF adress containing the end address of the basic block.
    967  * @param   hCfgBb              The basic block handle.
     932 * @param   hFlowBb              The basic block handle.
    968933 * @param   pAddrEnd            Where to store the end address of the basic block.
    969934 */
    970 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetEndAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrEnd)
    971 {
    972     PDBGFCFGBBINT pCfgBb = hCfgBb;
    973     AssertPtrReturn(pCfgBb, NULL);
     935VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetEndAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrEnd)
     936{
     937    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     938    AssertPtrReturn(pFlowBb, NULL);
    974939    AssertPtrReturn(pAddrEnd, NULL);
    975940
    976     *pAddrEnd = pCfgBb->AddrEnd;
     941    *pAddrEnd = pFlowBb->AddrEnd;
    977942    return pAddrEnd;
    978943}
     
    983948 *
    984949 * @returns Pointer to DBGF adress containing the branch address of the basic block.
    985  * @param   hCfgBb              The basic block handle.
     950 * @param   hFlowBb              The basic block handle.
    986951 * @param   pAddrTarget         Where to store the branch address of the basic block.
    987952 *
     
    989954 *       for every other basic block type.
    990955 */
    991 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetBranchAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrTarget)
    992 {
    993     PDBGFCFGBBINT pCfgBb = hCfgBb;
    994     AssertPtrReturn(pCfgBb, NULL);
     956VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetBranchAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrTarget)
     957{
     958    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     959    AssertPtrReturn(pFlowBb, NULL);
    995960    AssertPtrReturn(pAddrTarget, NULL);
    996     AssertReturn(   pCfgBb->enmEndType == DBGFCFGBBENDTYPE_UNCOND_JMP
    997                  || pCfgBb->enmEndType == DBGFCFGBBENDTYPE_COND,
     961    AssertReturn(   pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_UNCOND_JMP
     962                 || pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_COND,
    998963                 NULL);
    999964
    1000     *pAddrTarget = pCfgBb->AddrTarget;
     965    *pAddrTarget = pFlowBb->AddrTarget;
    1001966    return pAddrTarget;
    1002967}
     
    1008973 *
    1009974 * @returns Pointer to DBGF adress containing the following address of the basic block.
    1010  * @param   hCfgBb              The basic block handle.
     975 * @param   hFlowBb              The basic block handle.
    1011976 * @param   pAddrFollow         Where to store the following address of the basic block.
    1012977 *
     
    1015980 *       because the successor is referenced by multiple other blocks as an entry point.
    1016981 */
    1017 VMMR3DECL(PDBGFADDRESS) DBGFR3CfgBbGetFollowingAddress(DBGFCFGBB hCfgBb, PDBGFADDRESS pAddrFollow)
    1018 {
    1019     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1020     AssertPtrReturn(pCfgBb, NULL);
     982VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetFollowingAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrFollow)
     983{
     984    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     985    AssertPtrReturn(pFlowBb, NULL);
    1021986    AssertPtrReturn(pAddrFollow, NULL);
    1022     AssertReturn(   pCfgBb->enmEndType == DBGFCFGBBENDTYPE_UNCOND
    1023                  || pCfgBb->enmEndType == DBGFCFGBBENDTYPE_COND,
     987    AssertReturn(   pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_UNCOND
     988                 || pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_COND,
    1024989                 NULL);
    1025990
    1026     *pAddrFollow = pCfgBb->AddrEnd;
     991    *pAddrFollow = pFlowBb->AddrEnd;
    1027992    DBGFR3AddrAdd(pAddrFollow, 1);
    1028993    return pAddrFollow;
     
    1034999 *
    10351000 * @returns Last instruction type.
    1036  * @param   hCfgBb              The basic block handle.
    1037  */
    1038 VMMR3DECL(DBGFCFGBBENDTYPE) DBGFR3CfgBbGetType(DBGFCFGBB hCfgBb)
    1039 {
    1040     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1041     AssertPtrReturn(pCfgBb, DBGFCFGBBENDTYPE_INVALID);
    1042 
    1043     return pCfgBb->enmEndType;
     1001 * @param   hFlowBb              The basic block handle.
     1002 */
     1003VMMR3DECL(DBGFFLOWBBENDTYPE) DBGFR3FlowBbGetType(DBGFFLOWBB hFlowBb)
     1004{
     1005    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     1006    AssertPtrReturn(pFlowBb, DBGFFLOWBBENDTYPE_INVALID);
     1007
     1008    return pFlowBb->enmEndType;
    10441009}
    10451010
     
    10491014 *
    10501015 * @returns Number of instructions in the basic block.
    1051  * @param   hCfgBb              The basic block handle.
    1052  */
    1053 VMMR3DECL(uint32_t) DBGFR3CfgBbGetInstrCount(DBGFCFGBB hCfgBb)
    1054 {
    1055     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1056     AssertPtrReturn(pCfgBb, 0);
    1057 
    1058     return pCfgBb->cInstr;
     1016 * @param   hFlowBb              The basic block handle.
     1017 */
     1018VMMR3DECL(uint32_t) DBGFR3FlowBbGetInstrCount(DBGFFLOWBB hFlowBb)
     1019{
     1020    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     1021    AssertPtrReturn(pFlowBb, 0);
     1022
     1023    return pFlowBb->cInstr;
    10591024}
    10601025
     
    10631028 * Get flags for the given basic block.
    10641029 *
    1065  * @returns Combination of DBGF_CFG_BB_F_*
    1066  * @param   hCfgBb              The basic block handle.
    1067  */
    1068 VMMR3DECL(uint32_t) DBGFR3CfgBbGetFlags(DBGFCFGBB hCfgBb)
    1069 {
    1070     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1071     AssertPtrReturn(pCfgBb, 0);
    1072 
    1073     return pCfgBb->fFlags;
     1030 * @returns Combination of DBGF_FLOW_BB_F_*
     1031 * @param   hFlowBb              The basic block handle.
     1032 */
     1033VMMR3DECL(uint32_t) DBGFR3FlowBbGetFlags(DBGFFLOWBB hFlowBb)
     1034{
     1035    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     1036    AssertPtrReturn(pFlowBb, 0);
     1037
     1038    return pFlowBb->fFlags;
    10741039}
    10751040
     
    10791044 *
    10801045 * @returns VBox status code of the error for the basic block.
    1081  * @param   hCfgBb              The basic block handle.
     1046 * @param   hFlowBb              The basic block handle.
    10821047 * @param   ppszErr             Where to store the pointer to the error message - optional.
    10831048 */
    1084 VMMR3DECL(int) DBGFR3CfgBbQueryError(DBGFCFGBB hCfgBb, const char **ppszErr)
    1085 {
    1086     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1087     AssertPtrReturn(pCfgBb, VERR_INVALID_HANDLE);
     1049VMMR3DECL(int) DBGFR3FlowBbQueryError(DBGFFLOWBB hFlowBb, const char **ppszErr)
     1050{
     1051    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     1052    AssertPtrReturn(pFlowBb, VERR_INVALID_HANDLE);
    10881053
    10891054    if (ppszErr)
    1090         *ppszErr = pCfgBb->pszErr;
    1091 
    1092     return pCfgBb->rcError;
     1055        *ppszErr = pFlowBb->pszErr;
     1056
     1057    return pFlowBb->rcError;
    10931058}
    10941059
     
    10981063 *
    10991064 * @returns VBox status code.
    1100  * @param   hCfgBb              The basic block handle.
     1065 * @param   hFlowBb              The basic block handle.
    11011066 * @param   idxInstr            The instruction to query.
    11021067 * @param   pAddrInstr          Where to store the guest instruction address on success, optional.
     
    11041069 * @param   ppszInstr           Where to store the pointer to the disassembled instruction string, optional.
    11051070 */
    1106 VMMR3DECL(int) DBGFR3CfgBbQueryInstr(DBGFCFGBB hCfgBb, uint32_t idxInstr, PDBGFADDRESS pAddrInstr,
     1071VMMR3DECL(int) DBGFR3FlowBbQueryInstr(DBGFFLOWBB hFlowBb, uint32_t idxInstr, PDBGFADDRESS pAddrInstr,
    11071072                                     uint32_t *pcbInstr, const char **ppszInstr)
    11081073{
    1109     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1110     AssertPtrReturn(pCfgBb, VERR_INVALID_POINTER);
    1111     AssertReturn(idxInstr < pCfgBb->cInstr, VERR_INVALID_PARAMETER);
     1074    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     1075    AssertPtrReturn(pFlowBb, VERR_INVALID_POINTER);
     1076    AssertReturn(idxInstr < pFlowBb->cInstr, VERR_INVALID_PARAMETER);
    11121077
    11131078    if (pAddrInstr)
    1114         *pAddrInstr = pCfgBb->aInstr[idxInstr].AddrInstr;
     1079        *pAddrInstr = pFlowBb->aInstr[idxInstr].AddrInstr;
    11151080    if (pcbInstr)
    1116         *pcbInstr = pCfgBb->aInstr[idxInstr].cbInstr;
     1081        *pcbInstr = pFlowBb->aInstr[idxInstr].cbInstr;
    11171082    if (ppszInstr)
    1118         *ppszInstr = pCfgBb->aInstr[idxInstr].pszInstr;
     1083        *ppszInstr = pFlowBb->aInstr[idxInstr].pszInstr;
    11191084
    11201085    return VINF_SUCCESS;
     
    11261091 *
    11271092 * @returns VBox status code.
    1128  * @param   hCfgBb              The basic block handle.
    1129  * @param   phCfgBbFollow       Where to store the handle to the basic block following
     1093 * @param   hFlowBb              The basic block handle.
     1094 * @param   phFlowBbFollow       Where to store the handle to the basic block following
    11301095 *                              this one (optional).
    1131  * @param   phCfgBbTarget       Where to store the handle to the basic block being the
     1096 * @param   phFlowBbTarget       Where to store the handle to the basic block being the
    11321097 *                              branch target for this one (optional).
    11331098 */
    1134 VMMR3DECL(int) DBGFR3CfgBbQuerySuccessors(DBGFCFGBB hCfgBb, PDBGFCFGBB phCfgBbFollow, PDBGFCFGBB phCfgBbTarget)
    1135 {
    1136     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1137     AssertPtrReturn(pCfgBb, VERR_INVALID_POINTER);
    1138 
    1139     if (   phCfgBbFollow
    1140         && (   pCfgBb->enmEndType == DBGFCFGBBENDTYPE_UNCOND
    1141             || pCfgBb->enmEndType == DBGFCFGBBENDTYPE_COND))
    1142     {
    1143         DBGFADDRESS AddrStart = pCfgBb->AddrEnd;
     1099VMMR3DECL(int) DBGFR3FlowBbQuerySuccessors(DBGFFLOWBB hFlowBb, PDBGFFLOWBB phFlowBbFollow, PDBGFFLOWBB phFlowBbTarget)
     1100{
     1101    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     1102    AssertPtrReturn(pFlowBb, VERR_INVALID_POINTER);
     1103
     1104    if (   phFlowBbFollow
     1105        && (   pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_UNCOND
     1106            || pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_COND))
     1107    {
     1108        DBGFADDRESS AddrStart = pFlowBb->AddrEnd;
    11441109        DBGFR3AddrAdd(&AddrStart, 1);
    1145         int rc = DBGFR3CfgQueryBbByAddress(pCfgBb->pCfg, &AddrStart, phCfgBbFollow);
     1110        int rc = DBGFR3FlowQueryBbByAddress(pFlowBb->pFlow, &AddrStart, phFlowBbFollow);
    11461111        AssertRC(rc);
    11471112    }
    11481113
    1149     if (   phCfgBbTarget
    1150         && (   pCfgBb->enmEndType == DBGFCFGBBENDTYPE_UNCOND_JMP
    1151             || pCfgBb->enmEndType == DBGFCFGBBENDTYPE_COND))
    1152     {
    1153         int rc = DBGFR3CfgQueryBbByAddress(pCfgBb->pCfg, &pCfgBb->AddrTarget, phCfgBbTarget);
     1114    if (   phFlowBbTarget
     1115        && (   pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_UNCOND_JMP
     1116            || pFlowBb->enmEndType == DBGFFLOWBBENDTYPE_COND))
     1117    {
     1118        int rc = DBGFR3FlowQueryBbByAddress(pFlowBb->pFlow, &pFlowBb->AddrTarget, phFlowBbTarget);
    11541119        AssertRC(rc);
    11551120    }
     
    11631128 *
    11641129 * @returns Number of other basic blocks referencing this one.
    1165  * @param   hCfgBb              The basic block handle.
     1130 * @param   hFlowBb              The basic block handle.
    11661131 *
    11671132 * @note If the given basic block references itself (loop, etc.) this will be counted as well.
    11681133 */
    1169 VMMR3DECL(uint32_t) DBGFR3CfgBbGetRefBbCount(DBGFCFGBB hCfgBb)
    1170 {
    1171     PDBGFCFGBBINT pCfgBb = hCfgBb;
    1172     AssertPtrReturn(pCfgBb, 0);
     1134VMMR3DECL(uint32_t) DBGFR3FlowBbGetRefBbCount(DBGFFLOWBB hFlowBb)
     1135{
     1136    PDBGFFLOWBBINT pFlowBb = hFlowBb;
     1137    AssertPtrReturn(pFlowBb, 0);
    11731138
    11741139    uint32_t cRefsBb = 0;
    1175     PDBGFCFGBBINT pCfgBbCur = NULL;
    1176     RTListForEach(&pCfgBb->pCfg->LstCfgBb, pCfgBbCur, DBGFCFGBBINT, NdCfgBb)
    1177     {
    1178         if (pCfgBbCur->fFlags & DBGF_CFG_BB_F_INCOMPLETE_ERR)
     1140    PDBGFFLOWBBINT pFlowBbCur = NULL;
     1141    RTListForEach(&pFlowBb->pFlow->LstFlowBb, pFlowBbCur, DBGFFLOWBBINT, NdFlowBb)
     1142    {
     1143        if (pFlowBbCur->fFlags & DBGF_FLOW_BB_F_INCOMPLETE_ERR)
    11791144            continue;
    11801145
    1181         if (   pCfgBbCur->enmEndType == DBGFCFGBBENDTYPE_UNCOND
    1182             || pCfgBbCur->enmEndType == DBGFCFGBBENDTYPE_COND)
     1146        if (   pFlowBbCur->enmEndType == DBGFFLOWBBENDTYPE_UNCOND
     1147            || pFlowBbCur->enmEndType == DBGFFLOWBBENDTYPE_COND)
    11831148        {
    1184             DBGFADDRESS AddrStart = pCfgBb->AddrEnd;
     1149            DBGFADDRESS AddrStart = pFlowBb->AddrEnd;
    11851150            DBGFR3AddrAdd(&AddrStart, 1);
    1186             if (dbgfR3CfgBbAddrEqual(&pCfgBbCur->AddrStart, &AddrStart))
     1151            if (dbgfR3FlowBbAddrEqual(&pFlowBbCur->AddrStart, &AddrStart))
    11871152                cRefsBb++;
    11881153        }
    11891154
    1190         if (   (   pCfgBbCur->enmEndType == DBGFCFGBBENDTYPE_UNCOND_JMP
    1191                 || pCfgBbCur->enmEndType == DBGFCFGBBENDTYPE_COND)
    1192             && dbgfR3CfgBbAddrEqual(&pCfgBbCur->AddrStart, &pCfgBb->AddrTarget))
     1155        if (   (   pFlowBbCur->enmEndType == DBGFFLOWBBENDTYPE_UNCOND_JMP
     1156                || pFlowBbCur->enmEndType == DBGFFLOWBBENDTYPE_COND)
     1157            && dbgfR3FlowBbAddrEqual(&pFlowBbCur->AddrStart, &pFlowBb->AddrTarget))
    11931158            cRefsBb++;
    11941159    }
     
    12021167 * @returns VBox status code.
    12031168 * @retval  VERR_BUFFER_OVERFLOW if the array can't hold all the basic blocks.
    1204  * @param   hCfgBb              The basic block handle.
    1205  * @param   paCfgBbRef          Pointer to the array containing the referencing basic block handles on success.
     1169 * @param   hFlowBb              The basic block handle.
     1170 * @param   paFlowBbRef          Pointer to the array containing the referencing basic block handles on success.
    12061171 * @param   cRef                Number of entries in the given array.
    12071172 */
    1208 VMMR3DECL(int) DBGFR3CfgBbGetRefBb(DBGFCFGBB hCfgBb, PDBGFCFGBB paCfgBbRef, uint32_t cRef)
    1209 {
    1210     RT_NOREF3(hCfgBb, paCfgBbRef, cRef);
     1173VMMR3DECL(int) DBGFR3FlowBbGetRefBb(DBGFFLOWBB hFlowBb, PDBGFFLOWBB paFlowBbRef, uint32_t cRef)
     1174{
     1175    RT_NOREF3(hFlowBb, paFlowBbRef, cRef);
    12111176    return VERR_NOT_IMPLEMENTED;
    12121177}
     
    12161181 * @callback_method_impl{FNRTSORTCMP}
    12171182 */
    1218 static DECLCALLBACK(int) dbgfR3CfgItSortCmp(void const *pvElement1, void const *pvElement2, void *pvUser)
    1219 {
    1220     PDBGFCFGITORDER penmOrder = (PDBGFCFGITORDER)pvUser;
    1221     PDBGFCFGBBINT pCfgBb1 = *(PDBGFCFGBBINT *)pvElement1;
    1222     PDBGFCFGBBINT pCfgBb2 = *(PDBGFCFGBBINT *)pvElement2;
    1223 
    1224     if (dbgfR3CfgBbAddrEqual(&pCfgBb1->AddrStart, &pCfgBb2->AddrStart))
     1183static DECLCALLBACK(int) dbgfR3FlowItSortCmp(void const *pvElement1, void const *pvElement2, void *pvUser)
     1184{
     1185    PDBGFFLOWITORDER penmOrder = (PDBGFFLOWITORDER)pvUser;
     1186    PDBGFFLOWBBINT pFlowBb1 = *(PDBGFFLOWBBINT *)pvElement1;
     1187    PDBGFFLOWBBINT pFlowBb2 = *(PDBGFFLOWBBINT *)pvElement2;
     1188
     1189    if (dbgfR3FlowBbAddrEqual(&pFlowBb1->AddrStart, &pFlowBb2->AddrStart))
    12251190        return 0;
    12261191
    1227     if (*penmOrder == DBGFCFGITORDER_BY_ADDR_LOWEST_FIRST)
    1228     {
    1229         if (dbgfR3CfgBbAddrLower(&pCfgBb1->AddrStart, &pCfgBb2->AddrStart))
     1192    if (*penmOrder == DBGFFLOWITORDER_BY_ADDR_LOWEST_FIRST)
     1193    {
     1194        if (dbgfR3FlowBbAddrLower(&pFlowBb1->AddrStart, &pFlowBb2->AddrStart))
    12301195            return -1;
    12311196        else
     
    12341199    else
    12351200    {
    1236         if (dbgfR3CfgBbAddrLower(&pCfgBb1->AddrStart, &pCfgBb2->AddrStart))
     1201        if (dbgfR3FlowBbAddrLower(&pFlowBb1->AddrStart, &pFlowBb2->AddrStart))
    12371202            return 1;
    12381203        else
    12391204            return -1;
    12401205    }
    1241 
    1242     AssertFailed();
    12431206}
    12441207
     
    12481211 *
    12491212 * @returns VBox status code.
    1250  * @param   hCfg                The control flow graph handle.
     1213 * @param   hFlow                The control flow graph handle.
    12511214 * @param   enmOrder            The order in which the basic blocks are enumerated.
    1252  * @param   phCfgIt             Where to store the handle to the iterator on success.
    1253  */
    1254 VMMR3DECL(int) DBGFR3CfgItCreate(DBGFCFG hCfg, DBGFCFGITORDER enmOrder, PDBGFCFGIT phCfgIt)
     1215 * @param   phFlowIt             Where to store the handle to the iterator on success.
     1216 */
     1217VMMR3DECL(int) DBGFR3FlowItCreate(DBGFFLOW hFlow, DBGFFLOWITORDER enmOrder, PDBGFFLOWIT phFlowIt)
    12551218{
    12561219    int rc = VINF_SUCCESS;
    1257     PDBGFCFGINT pCfg = hCfg;
    1258     AssertPtrReturn(pCfg, VERR_INVALID_POINTER);
    1259     AssertPtrReturn(phCfgIt, VERR_INVALID_POINTER);
    1260     AssertReturn(enmOrder > DBGFCFGITORDER_INVALID && enmOrder < DBGFCFGITORDER_BREADTH_FIRST,
     1220    PDBGFFLOWINT pFlow = hFlow;
     1221    AssertPtrReturn(pFlow, VERR_INVALID_POINTER);
     1222    AssertPtrReturn(phFlowIt, VERR_INVALID_POINTER);
     1223    AssertReturn(enmOrder > DBGFFLOWITORDER_INVALID && enmOrder < DBGFFLOWITORDER_BREADTH_FIRST,
    12611224                 VERR_INVALID_PARAMETER);
    1262     AssertReturn(enmOrder < DBGFCFGITORDER_DEPTH_FRIST, VERR_NOT_IMPLEMENTED); /** @todo */
    1263 
    1264     PDBGFCFGITINT pIt = (PDBGFCFGITINT)RTMemAllocZ(RT_OFFSETOF(DBGFCFGITINT, apBb[pCfg->cBbs]));
     1225    AssertReturn(enmOrder < DBGFFLOWITORDER_DEPTH_FRIST, VERR_NOT_IMPLEMENTED); /** @todo */
     1226
     1227    PDBGFFLOWITINT pIt = (PDBGFFLOWITINT)RTMemAllocZ(RT_OFFSETOF(DBGFFLOWITINT, apBb[pFlow->cBbs]));
    12651228    if (RT_LIKELY(pIt))
    12661229    {
    1267         DBGFR3CfgRetain(hCfg);
    1268         pIt->pCfg      = pCfg;
     1230        DBGFR3FlowRetain(hFlow);
     1231        pIt->pFlow      = pFlow;
    12691232        pIt->idxBbNext = 0;
    12701233        /* Fill the list and then sort. */
    1271         PDBGFCFGBBINT pCfgBb;
     1234        PDBGFFLOWBBINT pFlowBb;
    12721235        uint32_t idxBb = 0;
    1273         RTListForEach(&pCfg->LstCfgBb, pCfgBb, DBGFCFGBBINT, NdCfgBb)
     1236        RTListForEach(&pFlow->LstFlowBb, pFlowBb, DBGFFLOWBBINT, NdFlowBb)
    12741237        {
    1275             DBGFR3CfgBbRetain(pCfgBb);
    1276             pIt->apBb[idxBb++] = pCfgBb;
     1238            DBGFR3FlowBbRetain(pFlowBb);
     1239            pIt->apBb[idxBb++] = pFlowBb;
    12771240        }
    12781241
    12791242        /* Sort the blocks by address. */
    1280         RTSortShell(&pIt->apBb[0], pCfg->cBbs, sizeof(PDBGFCFGBBINT), dbgfR3CfgItSortCmp, &enmOrder);
    1281 
    1282         *phCfgIt = pIt;
     1243        RTSortShell(&pIt->apBb[0], pFlow->cBbs, sizeof(PDBGFFLOWBBINT), dbgfR3FlowItSortCmp, &enmOrder);
     1244
     1245        *phFlowIt = pIt;
    12831246    }
    12841247    else
     
    12931256 *
    12941257 * @returns nothing.
    1295  * @param   hCfgIt              The control flow graph iterator handle.
    1296  */
    1297 VMMR3DECL(void) DBGFR3CfgItDestroy(DBGFCFGIT hCfgIt)
    1298 {
    1299     PDBGFCFGITINT pIt = hCfgIt;
     1258 * @param   hFlowIt              The control flow graph iterator handle.
     1259 */
     1260VMMR3DECL(void) DBGFR3FlowItDestroy(DBGFFLOWIT hFlowIt)
     1261{
     1262    PDBGFFLOWITINT pIt = hFlowIt;
    13001263    AssertPtrReturnVoid(pIt);
    13011264
    1302     for (unsigned i = 0; i < pIt->pCfg->cBbs; i++)
    1303         DBGFR3CfgBbRelease(pIt->apBb[i]);
    1304 
    1305     DBGFR3CfgRelease(pIt->pCfg);
     1265    for (unsigned i = 0; i < pIt->pFlow->cBbs; i++)
     1266        DBGFR3FlowBbRelease(pIt->apBb[i]);
     1267
     1268    DBGFR3FlowRelease(pIt->pFlow);
    13061269    RTMemFree(pIt);
    13071270}
     
    13141277 * @returns Handle to the next basic block in the iterator or NULL if the end
    13151278 *          was reached.
    1316  * @param   hCfgIt              The iterator handle.
    1317  *
    1318  * @note If a valid handle is returned it must be release with DBGFR3CfgBbRelease()
     1279 * @param   hFlowIt              The iterator handle.
     1280 *
     1281 * @note If a valid handle is returned it must be release with DBGFR3FlowBbRelease()
    13191282 *       when not required anymore.
    13201283 */
    1321 VMMR3DECL(DBGFCFGBB) DBGFR3CfgItNext(DBGFCFGIT hCfgIt)
    1322 {
    1323     PDBGFCFGITINT pIt = hCfgIt;
     1284VMMR3DECL(DBGFFLOWBB) DBGFR3FlowItNext(DBGFFLOWIT hFlowIt)
     1285{
     1286    PDBGFFLOWITINT pIt = hFlowIt;
    13241287    AssertPtrReturn(pIt, NULL);
    13251288
    1326     PDBGFCFGBBINT pCfgBb = NULL;
    1327     if (pIt->idxBbNext < pIt->pCfg->cBbs)
    1328     {
    1329         pCfgBb = pIt->apBb[pIt->idxBbNext++];
    1330         DBGFR3CfgBbRetain(pCfgBb);
    1331     }
    1332 
    1333     return pCfgBb;
     1289    PDBGFFLOWBBINT pFlowBb = NULL;
     1290    if (pIt->idxBbNext < pIt->pFlow->cBbs)
     1291    {
     1292        pFlowBb = pIt->apBb[pIt->idxBbNext++];
     1293        DBGFR3FlowBbRetain(pFlowBb);
     1294    }
     1295
     1296    return pFlowBb;
    13341297}
    13351298
     
    13391302 *
    13401303 * @returns VBox status code.
    1341  * @param   hCfgIt              The iterator handle.
    1342  */
    1343 VMMR3DECL(int) DBGFR3CfgItReset(DBGFCFGIT hCfgIt)
    1344 {
    1345     PDBGFCFGITINT pIt = hCfgIt;
     1304 * @param   hFlowIt              The iterator handle.
     1305 */
     1306VMMR3DECL(int) DBGFR3FlowItReset(DBGFFLOWIT hFlowIt)
     1307{
     1308    PDBGFFLOWITINT pIt = hFlowIt;
    13461309    AssertPtrReturn(pIt, VERR_INVALID_HANDLE);
    13471310
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