VirtualBox

Changeset 63201 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 9, 2016 12:14:49 PM (8 years ago)
Author:
vboxsync
Message:

Runtime/common/dbg/dbgmoddwarf.cpp: Fix getting line numbers from DWARF debug info generated by LLVM, it emits debug info for global constructors inserted by the compiler resulting in the line number being 0 making parsing the debug info fail and source code lines not being displayed in RTLdrFlt for example

File:
1 edited

Legend:

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

    r62564 r63201  
    24632463                  cOpIndexDelta, pLnState->Regs.idxOp));
    24642464
    2465             rc = rtDwarfLine_AddLine(pLnState, offOpCode);
     2465            /*
     2466             * LLVM emits debug info for global constructors (_GLOBAL__I_a) which are not part of source
     2467             * code but are inserted by the compiler: The resulting line number will be 0
     2468             * because they are not part of the source file obviously (see https://review.llvm.org/rL205999),
     2469             * so skip adding them when they are encountered.
     2470             */
     2471            if (pLnState->Regs.uLine)
     2472                rc = rtDwarfLine_AddLine(pLnState, offOpCode);
    24662473        }
    24672474        else
     
    24742481                case DW_LNS_copy:
    24752482                    Log2(("%08x: DW_LNS_copy\n", offOpCode));
    2476                     rc = rtDwarfLine_AddLine(pLnState, offOpCode);
     2483                    /* See the comment about LLVM above. */
     2484                    if (pLnState->Regs.uLine)
     2485                        rc = rtDwarfLine_AddLine(pLnState, offOpCode);
    24772486                    break;
    24782487
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