3540 – Another DWARF line number fix

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3540 - Another DWARF line number fix
Summary: Another DWARF line number fix
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, wrong-code
Depends on:
Blocks: 3214
Show dependency tree / graph
Reported: 2009年11月21日 18:24 UTC by nfxjfg
Modified: 2014年04月18日 09:12 UTC (History)
3 users (show)

See Also:


Attachments
fix for .debug_line output (1.38 KB, patch)
2009年11月21日 18:25 UTC, nfxjfg
Details | Diff
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description nfxjfg 2009年11月21日 18:24:25 UTC
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.
Comment 1 nfxjfg 2009年11月21日 18:25:04 UTC
Created attachment 513 [details] 
fix for .debug_line output
Comment 2 Leandro Lucarella 2009年11月22日 14:26:54 UTC
SVN commit: http://www.dsource.org/projects/dmd/changeset/265 
Comment 3 nfxjfg 2009年11月22日 21:38:32 UTC
Great! That means this particular bug is fixed in the SVN version.
Now Walter, what about bug 3214? Please comment!
Comment 4 Koroskin Denis 2009年11月24日 04:10:07 UTC
Please, don't close bugs until a fix is proven to work. There is no DMD release that has this bug fixed yet.
Comment 5 Walter Bright 2009年12月06日 00:48:31 UTC
Fixed dmd 1.053 and 2.037


AltStyle によって変換されたページ (->オリジナル) /