VirtualBox

Changeset 65394 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jan 20, 2017 7:44:18 PM (8 years ago)
Author:
vboxsync
Message:

Runtime/common/dbg/dbgmoddwarf.cpp: A more complete fix, the DWARF spec varies greatly on the implementation between versions 2, 3 and 4 and the description for this opcode is not useful in either version...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp

    r65393 r65394  
    25262526                case DW_LNS_const_add_pc:
    25272527                {
    2528                     uint8_t u8Inc = (255 - pLnState->Hdr.u8OpcodeBase) / pLnState->Hdr.u8LineRange;
    2529 
    2530                     pLnState->Regs.uAddress += u8Inc;
    2531                     if (pLnState->Hdr.uVer >= 4)
    2532                         pLnState->Regs.idxOp += u8Inc;
    2533 
     2528                    uint8_t u8Adv = (255 - pLnState->Hdr.u8OpcodeBase) / pLnState->Hdr.u8LineRange;
     2529
     2530                    if (pLnState->Hdr.cMaxOpsPerInstr < 2)
     2531                        pLnState->Regs.uAddress += pLnState->Hdr.cbMinInstr * u8Adv;
     2532                    else
     2533                    {
     2534                        pLnState->Regs.uAddress += pLnState->Hdr.cbMinInstr
     2535                                                 * ((pLnState->Regs.idxOp + u8Adv) / pLnState->Hdr.cMaxOpsPerInstr);
     2536                        pLnState->Regs.idxOp = (pLnState->Regs.idxOp + u8Adv) % pLnState->Hdr.cMaxOpsPerInstr;
     2537                    }
    25342538                    Log2(("%08x: DW_LNS_const_add_pc\n", offOpCode));
    25352539                    break;
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