VirtualBox

Changeset 65393 in vbox


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

Runtime/common/dbg/dbgmoddwarf.cpp: Fix implementation of DW_LNS_const_add_pc fixing address calculation for files and line numbers for gcc emitted debug information

File:
1 edited

Legend:

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

    r63202 r65393  
    25252525
    25262526                case DW_LNS_const_add_pc:
    2527                     pLnState->Regs.uAddress += (pLnState->Regs.idxOp + 255) / pLnState->Hdr.cMaxOpsPerInstr
    2528                                              * pLnState->Hdr.cbMinInstr;
    2529                     pLnState->Regs.idxOp    += (pLnState->Regs.idxOp + 255) % pLnState->Hdr.cMaxOpsPerInstr;
     2527                {
     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
    25302534                    Log2(("%08x: DW_LNS_const_add_pc\n", offOpCode));
    25312535                    break;
    2532 
     2536                }
    25332537                case DW_LNS_fixed_advance_pc:
    25342538                    pLnState->Regs.uAddress += rtDwarfCursor_GetUHalf(pCursor, 0);
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