[Issue 3540] New: Another DWARF line number fix

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 21 18:24:26 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3540

           Summary: Another DWARF line number fix
           Product: D
           Version: 1.051
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: patch, wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: nfxjfg at gmail.com


--- Comment #0 from nfxjfg at gmail.com 2009-11-21 18:24:25 PST ---
There's a small detail wrong with the DWARF line number information: your code
makes wrong assumptions when the line number state machine register state is
reset. The DWARF specification says it's reset after DW_LNE_end_sequence, but
as your code resets the register state, it doesn't emit a DW_LNE_end_sequence.
The result is that some address/line number ranges in .debug_line are
completely bogus.

This patch provides a simple fix by moving DW_LNE_end_sequence to where it is
appropriate.

(Note that some DWARF consumers, such as GNU BFD, are able to deal with the
buggy line number information.)

(I hope the wrong-code keyword isn't inappropriate here.)

Note that this bug is unrelated to bug 3214, which has yet to be fixed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list