VirtualBox

Changeset 41790 in vbox for trunk/include/VBox/dis.h


Ignore:
Timestamp:
Jun 16, 2012 8:33:45 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78608
Message:

DISCPUSTATE -> DISSTATE (slow change).

File:
1 edited

Legend:

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

    r41789 r41790  
    3636
    3737/**
    38  * CPU mode flags (DISCPUSTATE::mode).
     38 * CPU mode flags (DISSTATE::mode).
    3939 */
    4040typedef enum DISCPUMODE
     
    4848} DISCPUMODE;
    4949
    50 /** @name Prefix byte flags (DISCPUSTATE::fPrefix).
     50/** @name Prefix byte flags (DISSTATE::fPrefix).
    5151 * @{
    5252 */
     
    6868/** @} */
    6969
    70 /** @name 64 bits prefix byte flags (DISCPUSTATE::fRexPrefix).
     70/** @name 64 bits prefix byte flags (DISSTATE::fRexPrefix).
    7171 * Requires VBox/disopcode.h.
    7272 * @{
     
    499499 * Callback for reading instruction bytes.
    500500 *
    501  * @returns VBox status code, bytes in DISCPUSTATE::abInstr and byte count in
    502  *          DISCPUSTATE::cbCachedInstr.
     501 * @returns VBox status code, bytes in DISSTATE::abInstr and byte count in
     502 *          DISSTATE::cbCachedInstr.
    503503 * @param   pDis            Pointer to the disassembler state.  The user
    504  *                          argument can be found in DISCPUSTATE::pvUser if
    505  *                          needed.
     504 *                          argument can be found in DISSTATE::pvUser if needed.
    506505 * @param   offInstr        The offset relative to the start of the instruction.
    507506 *
    508507 *                          To get the source address, add this to
    509  *                          DISCPUSTATE::uInstrAddr.
     508 *                          DISSTATE::uInstrAddr.
    510509 *
    511510 *                          To calculate the destination buffer address, use it
    512  *                          as an index into DISCPUSTATE::abInstr.
     511 *                          as an index into DISSTATE::abInstr.
    513512 *
    514513 * @param   cbMinRead       The minimum number of bytes to read.
    515514 * @param   cbMaxRead       The maximum number of bytes that may be read.
    516515 */
    517 typedef DECLCALLBACK(int) FNDISREADBYTES(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead);
     516typedef DECLCALLBACK(int) FNDISREADBYTES(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead);
    518517/** Pointer to a opcode byte reader. */
    519518typedef FNDISREADBYTES *PFNDISREADBYTES;
     
    522521 * @remark no DECLCALLBACK() here because it's considered to be internal and
    523522 *         there is no point in enforcing CDECL. */
    524 typedef size_t FNDISPARSE(size_t offInstr, PCDISOPCODE pOp, PDISOPPARAM pParam, PDISCPUSTATE pCpu);
     523typedef size_t FNDISPARSE(size_t offInstr, PCDISOPCODE pOp, PDISOPPARAM pParam, PDISSTATE pDis);
    525524/** Pointer to a disassembler parser function. */
    526525typedef FNDISPARSE *PFNDISPARSE;
     
    534533 *       doesn't make any sense right now because of structure alignment.
    535534 */
    536 typedef struct DISCPUSTATE
     535typedef struct DISSTATE
    537536{
    538537    /* Because of pvUser2, put the less frequently used bits at the top for
     
    639638    uint32_t        uPadding5;
    640639#endif
    641 } DISCPUSTATE;
     640} DISSTATE;
     641
     642/** @deprecated  Use DISSTATE and change Cpu and DisState to Dis. */
     643typedef DISSTATE DISCPUSTATE;
    642644
    643645
    644646
    645647DISDECL(int) DISInstrToStr(void const *pvInstr, DISCPUMODE enmCpuMode,
    646                            PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput);
     648                           PDISSTATE pDis, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput);
    647649DISDECL(int) DISInstrToStrWithReader(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PFNDISREADBYTES pfnReadBytes, void *pvUser,
    648                                      PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput);
     650                                     PDISSTATE pDis, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput);
    649651DISDECL(int) DISInstrToStrEx(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode,
    650652                             PFNDISREADBYTES pfnReadBytes, void *pvUser, uint32_t uFilter,
    651                              PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput);
    652 
    653 DISDECL(int) DISInstr(void const *pvInstr, DISCPUMODE enmCpuMode, PDISCPUSTATE pCpu, uint32_t *pcbInstr);
     653                             PDISSTATE pDis, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput);
     654
     655DISDECL(int) DISInstr(void const *pvInstr, DISCPUMODE enmCpuMode, PDISSTATE pDis, uint32_t *pcbInstr);
    654656DISDECL(int) DISInstrWithReader(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, PFNDISREADBYTES pfnReadBytes, void *pvUser,
    655                                 PDISCPUSTATE pCpu, uint32_t *pcbInstr);
     657                                PDISSTATE pDis, uint32_t *pcbInstr);
    656658DISDECL(int) DISInstEx(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, uint32_t uFilter,
    657659                       PFNDISREADBYTES pfnReadBytes, void *pvUser,
    658                        PDISCPUSTATE pCpu, uint32_t *pcbInstr);
     660                       PDISSTATE pDis, uint32_t *pcbInstr);
    659661DISDECL(int) DISInstWithPrefetchedBytes(RTUINTPTR uInstrAddr, DISCPUMODE enmCpuMode, uint32_t fFilter,
    660662                                        void const *pvPrefetched, size_t cbPretched,
    661663                                        PFNDISREADBYTES pfnReadBytes, void *pvUser,
    662                                         PDISCPUSTATE pCpu, uint32_t *pcbInstr);
    663 
    664 DISDECL(int)        DISGetParamSize(PCDISCPUSTATE pCpu, PCDISOPPARAM pParam);
    665 DISDECL(DISSELREG)  DISDetectSegReg(PCDISCPUSTATE pCpu, PCDISOPPARAM pParam);
    666 DISDECL(uint8_t)    DISQuerySegPrefixByte(PCDISCPUSTATE pCpu);
     664                                        PDISSTATE pDis, uint32_t *pcbInstr);
     665
     666DISDECL(int)        DISGetParamSize(PCDISSTATE pDis, PCDISOPPARAM pParam);
     667DISDECL(DISSELREG)  DISDetectSegReg(PCDISSTATE pDis, PCDISOPPARAM pParam);
     668DISDECL(uint8_t)    DISQuerySegPrefixByte(PCDISSTATE pDis);
    667669
    668670
     
    716718    DISQPVWHAT_32_BIT_HACK = 0x7fffffff
    717719} DISQPVWHICH;
    718 DISDECL(int) DISQueryParamVal(PCPUMCTXCORE pCtx, PCDISCPUSTATE pCpu, PCDISOPPARAM pParam, PDISQPVPARAMVAL pParamVal, DISQPVWHICH parmtype);
    719 DISDECL(int) DISQueryParamRegPtr(PCPUMCTXCORE pCtx, PCDISCPUSTATE pCpu, PCDISOPPARAM pParam, void **ppReg, size_t *pcbSize);
     720DISDECL(int) DISQueryParamVal(PCPUMCTXCORE pCtx, PCDISSTATE pDis, PCDISOPPARAM pParam, PDISQPVPARAMVAL pParamVal, DISQPVWHICH parmtype);
     721DISDECL(int) DISQueryParamRegPtr(PCPUMCTXCORE pCtx, PCDISSTATE pDis, PCDISOPPARAM pParam, void **ppReg, size_t *pcbSize);
    720722
    721723DISDECL(int) DISFetchReg8(PCCPUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal);
     
    747749 * @retval  VERR_SYMBOL_NOT_FOUND if no matching symbol was found for the address.
    748750 *
    749  * @param   pCpu        Pointer to the disassembler CPU state.
     751 * @param   pDis        Pointer to the disassembler CPU state.
    750752 * @param   u32Sel      The selector value. Use DIS_FMT_SEL_IS_REG, DIS_FMT_SEL_GET_VALUE,
    751753 *                      DIS_FMT_SEL_GET_REG to access this.
     
    757759 * @param   pvUser      The user argument.
    758760 */
    759 typedef DECLCALLBACK(int) FNDISGETSYMBOL(PCDISCPUSTATE pCpu, uint32_t u32Sel, RTUINTPTR uAddress, char *pszBuf, size_t cchBuf, RTINTPTR *poff, void *pvUser);
     761typedef DECLCALLBACK(int) FNDISGETSYMBOL(PCDISSTATE pDis, uint32_t u32Sel, RTUINTPTR uAddress, char *pszBuf, size_t cchBuf, RTINTPTR *poff, void *pvUser);
    760762/** Pointer to a FNDISGETSYMBOL(). */
    761763typedef FNDISGETSYMBOL *PFNDISGETSYMBOL;
     
    824826/** @} */
    825827
    826 DISDECL(size_t) DISFormatYasm(  PCDISCPUSTATE pCpu, char *pszBuf, size_t cchBuf);
    827 DISDECL(size_t) DISFormatYasmEx(PCDISCPUSTATE pCpu, char *pszBuf, size_t cchBuf, uint32_t fFlags, PFNDISGETSYMBOL pfnGetSymbol, void *pvUser);
    828 DISDECL(size_t) DISFormatMasm(  PCDISCPUSTATE pCpu, char *pszBuf, size_t cchBuf);
    829 DISDECL(size_t) DISFormatMasmEx(PCDISCPUSTATE pCpu, char *pszBuf, size_t cchBuf, uint32_t fFlags, PFNDISGETSYMBOL pfnGetSymbol, void *pvUser);
    830 DISDECL(size_t) DISFormatGas(   PCDISCPUSTATE pCpu, char *pszBuf, size_t cchBuf);
    831 DISDECL(size_t) DISFormatGasEx( PCDISCPUSTATE pCpu, char *pszBuf, size_t cchBuf, uint32_t fFlags, PFNDISGETSYMBOL pfnGetSymbol, void *pvUser);
    832 
    833 /** @todo DISAnnotate(PCDISCPUSTATE pCpu, char *pszBuf, size_t cchBuf, register reader, memory reader); */
    834 
    835 DISDECL(bool)   DISFormatYasmIsOddEncoding(PDISCPUSTATE pCpu);
     828DISDECL(size_t) DISFormatYasm(  PCDISSTATE pDis, char *pszBuf, size_t cchBuf);
     829DISDECL(size_t) DISFormatYasmEx(PCDISSTATE pDis, char *pszBuf, size_t cchBuf, uint32_t fFlags, PFNDISGETSYMBOL pfnGetSymbol, void *pvUser);
     830DISDECL(size_t) DISFormatMasm(  PCDISSTATE pDis, char *pszBuf, size_t cchBuf);
     831DISDECL(size_t) DISFormatMasmEx(PCDISSTATE pDis, char *pszBuf, size_t cchBuf, uint32_t fFlags, PFNDISGETSYMBOL pfnGetSymbol, void *pvUser);
     832DISDECL(size_t) DISFormatGas(   PCDISSTATE pDis, char *pszBuf, size_t cchBuf);
     833DISDECL(size_t) DISFormatGasEx( PCDISSTATE pDis, char *pszBuf, size_t cchBuf, uint32_t fFlags, PFNDISGETSYMBOL pfnGetSymbol, void *pvUser);
     834
     835/** @todo DISAnnotate(PCDISSTATE pDis, char *pszBuf, size_t cchBuf, register
     836 *        reader, memory reader); */
     837
     838DISDECL(bool)   DISFormatYasmIsOddEncoding(PDISSTATE pDis);
    836839
    837840
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