VirtualBox

Changeset 35625 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jan 19, 2011 11:17:34 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69526
Message:

DBGF,CPUM,DBGC: Use DBGFReg in the debugger, stop accessing CPUMCTX structures directly when messing with registers.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dbg.h

    r35346 r35625  
    101101    /** Flat HC pointer. */
    102102    DBGCVAR_TYPE_HC_FLAT,
    103     /** Segmented HC pointer. */
     103    /** Segmented HC pointer.
     104     * @todo drop this  */
    104105    DBGCVAR_TYPE_HC_FAR,
    105106    /** Physical HC pointer. */
     
    109110    /** Number. */
    110111    DBGCVAR_TYPE_NUMBER,
    111     /** Symbol. */
     112    /** Symbol.
     113     * @todo drop this   */
    112114    DBGCVAR_TYPE_SYMBOL,
    113115    /** Special type used when querying symbols. */
     
    285287
    286288/**
    287  * Macro for initializing a DBGC variable with a number
     289 * Macro for initializing a DBGC variable with a number.
    288290 */
    289291#define DBGCVAR_INIT_NUMBER(pVar, Value) \
     
    293295            (pVar)->u.u64Number = (Value); \
    294296        } while (0)
     297
     298/**
     299 * Macro for initializing a DBGC variable with a string.
     300 */
     301#define DBGCVAR_INIT_STRING(pVar, a_pszString) \
     302        do { \
     303            DBGCVAR_INIT(pVar); \
     304            (pVar)->enmType      = DBGCVAR_TYPE_STRING; \
     305            (pVar)->enmRangeType = DBGCVAR_RANGE_BYTES; \
     306            (pVar)->u.pszString  = (a_pszString); \
     307            (pVar)->u64Range     = strlen(a_pszString); \
     308        } while (0)
     309
    295310
    296311
     
    494509
    495510    /**
     511     * Converts a DBGC variable to a 64-bit number.
     512     *
     513     * @returns VBox status code.
     514     * @param   pCmdHlp     Pointer to the command callback structure.
     515     * @param   pVar        The variable to convert.
     516     * @param   pu64Number  Where to store the number.
     517     */
     518    DECLCALLBACKMEMBER(int, pfnVarToNumber)(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVar, uint64_t *pu64Number);
     519
     520    /**
    496521     * Converts a DBGC variable to a boolean.
    497522     *
     
    517542
    518543    /**
     544     * Converts a variable to one with the specified type.
     545     *
     546     * This preserves the range.
     547     *
     548     * @returns VBox status code.
     549     * @param   pCmdHlp     Pointer to the command callback structure.
     550     * @param   pVar        The variable to convert.
     551     * @param   enmToType   The target type.
     552     * @param   fConvSyms   If @c true, then attempt to resolve symbols.
     553     * @param   pResult     The output variable. Can be the same as @a pVar.
     554     */
     555    DECLCALLBACKMEMBER(int, pfnVarConvert)(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVar, DBGCVARTYPE enmToType, bool fConvSyms,
     556                                           PDBGCVAR pResult);
     557
     558    /**
    519559     * Gets a DBGF output helper that directs the output to the debugger
    520560     * console.
     
    643683
    644684/**
     685 * @copydoc DBGCCMDHLP::pfnVarToNumber
     686 */
     687DECLINLINE(int) DBGCCmdHlpVarToNumber(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVar, uint64_t *pu64Number)
     688{
     689    return pCmdHlp->pfnVarToNumber(pCmdHlp, pVar, pu64Number);
     690}
     691
     692/**
     693 * @copydoc DBGCCMDHLP::pfnVarToBool
     694 */
     695DECLINLINE(int) DBGCCmdHlpVarToBool(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVar, bool *pf)
     696{
     697    return pCmdHlp->pfnVarToBool(pCmdHlp, pVar, pf);
     698}
     699
     700/**
    645701 * @copydoc DBGCCMDHLP::pfnVarGetRange
    646702 */
     
    648704{
    649705    return pCmdHlp->pfnVarGetRange(pCmdHlp, pVar, cbElement, cbDefault, pcbRange);
     706}
     707
     708/**
     709 * @copydoc DBGCCMDHLP::pfnVarConvert
     710 */
     711DECLINLINE(int) DBGCCmdHlpConvert(PDBGCCMDHLP pCmdHlp, PCDBGCVAR pVar, DBGCVARTYPE enmToType, bool fConvSyms, PDBGCVAR pResult)
     712{
     713    return pCmdHlp->pfnVarConvert(pCmdHlp, pVar, enmToType, fConvSyms, pResult);
    650714}
    651715
  • trunk/include/VBox/vmm/dbgf.h

    r35606 r35625  
    14621462VMMR3DECL(int) DBGFR3RegNmQueryAll( PVM pVM,                   PDBGFREGENTRYNM paRegs, size_t cRegs);
    14631463
     1464VMMR3DECL(int) DBGFR3RegNmSet(      PVM pVM, VMCPUID idDefCpu, const char *pszReg, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType);
    14641465VMMR3DECL(int) DBGFR3RegNmSetU8(    PVM pVM, VMCPUID idDefCpu, const char *pszReg, uint8_t     u8);
    14651466VMMR3DECL(int) DBGFR3RegNmSetU16(   PVM pVM, VMCPUID idDefCpu, const char *pszReg, uint16_t    u16);
Note: See TracChangeset for help on using the changeset viewer.

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