VirtualBox

Ignore:
Timestamp:
Mar 29, 2023 2:13:56 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156581
Message:

Disassembler,VMM,Runtime: Get rid of deprecated DISCPUSTATE types (preparation for architecture specific separation in order to support ARMv8), bugref:10394

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstLdrDisasmTest.cpp

    r98103 r99208  
    9393 * @callback_method_impl{FNDISREADBYTES}
    9494 */
    95 static DECLCALLBACK(int) DisasmTest1ReadCode(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
     95static DECLCALLBACK(int) DisasmTest1ReadCode(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead)
    9696{
    9797    size_t cb = cbMaxRead;
     
    107107 * Use an inline function here just to test '__textcoal_nt' sections on darwin.
    108108 */
    109 inline int MyDisasm(uintptr_t CodeIndex, PDISCPUSTATE pCpu, uint32_t *pcb)
     109inline int MyDisasm(uintptr_t CodeIndex, PDISSTATE pDis, uint32_t *pcb)
    110110{
    111111    uint32_t cb;
    112     int rc = DISInstrWithReader(CodeIndex, DISCPUMODE_32BIT, DisasmTest1ReadCode, 0, pCpu, &cb);
     112    int rc = DISInstrWithReader(CodeIndex, DISCPUMODE_32BIT, DisasmTest1ReadCode, 0, pDis, &cb);
    113113    *pcb = cb;
    114114    MY_PRINTF(("DISCoreOneEx -> rc=%d cb=%d  Cpu: bOpCode=%#x pCurInstr=%p (42=%d)\n", \
    115                rc, cb, pCpu->bOpCode, pCpu->pCurInstr, 42)); \
     115               rc, cb, pDis->bOpCode, pDis->pCurInstr, 42)); \
    116116    return rc;
    117117}
     
    120120extern "C" DECLEXPORT(int) DisasmTest1(void)
    121121{
    122     DISCPUSTATE Cpu;
     122    DISSTATE  Dis;
    123123    uintptr_t CodeIndex = 0;
    124124    uint32_t cb;
     
    140140#endif
    141141
    142     memset(&Cpu, 0, sizeof(Cpu));
     142    memset(&Dis, 0, sizeof(Dis));
    143143
    144144#define DISAS_AND_CHECK(cbInstr, enmOp) \
    145145        do { \
    146             rc = MyDisasm(CodeIndex, &Cpu, &cb); \
     146            rc = MyDisasm(CodeIndex, &Dis, &cb); \
    147147            if (RT_FAILURE(rc)) \
    148148                return CodeIndex | 0xf000; \
    149             if (Cpu.pCurInstr->uOpcode != (enmOp)) \
     149            if (Dis.pCurInstr->uOpcode != (enmOp)) \
    150150                return CodeIndex| 0xe000; \
    151151            if (cb != (cbInstr)) \
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