VirtualBox

Changeset 41658 in vbox for trunk/src/recompiler


Ignore:
Timestamp:
Jun 11, 2012 10:21:44 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78464
Message:

DIS,VMM,REM,IPRT: Disassembler API adjustments.

Location:
trunk/src/recompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r40907 r41658  
    654654static const REMPARMDESC g_aArgsDISInstr[] =
    655655{
    656     { REMPARMDESC_FLAGS_INT,        sizeof(PVM),                NULL },
    657656    { REMPARMDESC_FLAGS_INT,        sizeof(RTUINTPTR),          NULL },
    658     { REMPARMDESC_FLAGS_INT,        sizeof(uint32_t),           NULL },
     657    { REMPARMDESC_FLAGS_INT,        sizeof(DISCPUMODE),         NULL },
     658    { REMPARMDESC_FLAGS_INT,        sizeof(PDISCPUSTATE),       NULL },
    659659    { REMPARMDESC_FLAGS_INT,        sizeof(uint32_t *),         NULL },
    660660    { REMPARMDESC_FLAGS_INT,        sizeof(char *),             NULL }
  • trunk/src/recompiler/VBoxRecompiler.c

    r41436 r41658  
    40714071        char            szOutput[256];
    40724072        DISCPUSTATE     Cpu;
    4073 
    4074         memset(&Cpu, 0, sizeof(Cpu));
    40754073#ifdef RT_ARCH_X86
    4076         Cpu.mode = CPUMODE_32BIT;
     4074        DISCPUMODE      enmCpuMode = CPUMODE_32BIT;
    40774075#else
    4078         Cpu.mode = CPUMODE_64BIT;
     4076        DISCPUMODE      enmCpuMode = CPUMODE_64BIT;
    40794077#endif
    40804078
     
    40834081        {
    40844082            uint32_t cbInstr;
    4085             if (RT_SUCCESS(DISInstr(&Cpu, (uintptr_t)pvCode + off, 0, &cbInstr, szOutput)))
     4083            int rc = DISInstr((uintptr_t)pvCode + off, enmCpuMode, &Cpu, &cbInstr, szOutput);
     4084            if (RT_SUCCESS(rc))
    40864085                RTLogPrintf("%s", szOutput);
    40874086            else
    40884087            {
    4089                 RTLogPrintf("disas error\n");
     4088                RTLogPrintf("disas error %Rrc\n", rc);
    40904089                cbInstr = 1;
    4091 #ifdef RT_ARCH_AMD64 /** @todo remove when DISInstr starts supporting 64-bit code. */
    4092                 break;
    4093 #endif
    40944090            }
    40954091            off += 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