Bug 22848 – DWARF .debug_line section should be generated to conform with DW_AT_stmt_list bounds

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2022-03-04T16:02:36Z
Last change time
2022-03-04T21:44:33Z
Keywords
pull
Assigned to
No Owner
Creator
Luís Ferreira

Comments

Comment #0 by contact — 2022-03-04T16:02:36Z
The current DWARF generator doesn't generate .debug_line section if there is no entries in the line table, although, to conform with DWARF standard and, in order to readers read it correctly, this section need to be present, even though, empty.
Comment #1 by dlang-bot — 2022-03-04T16:05:13Z
@ljmf00 created dlang/dmd pull request #13757 "Fix issue 22848: DWARF .debug_line section should be always generated" fixing this issue: - Fix issue 22848: DWARF .debug_line section should be always generated The current DWARF generator doesn't generate .debug_line section if there is no entries in the line table, although, to conform with DWARF standard and, in order to readers read it correctly, this section need to be present, even though, empty. This change reverts d72827c39c273162966d90e64daa414c42e325c0, an old bug on OSX ld64-77. Signed-off-by: Luís Ferreira <[email protected]> https://github.com/dlang/dmd/pull/13757
Comment #2 by dlang-bot — 2022-03-04T21:44:33Z
dlang/dmd pull request #13757 "Fix issue 22848: DWARF .debug_line section should be always generated" was merged into master: - 149ee468b3a39ec920664232e271333302c1a9dc by Luís Ferreira: Fix issue 22848: DWARF .debug_line section should be always generated The current DWARF generator doesn't generate .debug_line section if there is no entries in the line table, although, to conform with DWARF standard and, in order to readers read it correctly, this section need to be present, even though, empty. This change reverts d72827c39c273162966d90e64daa414c42e325c0, an old bug on OSX ld64-77. Related to issue 3502. Signed-off-by: Luís Ferreira <[email protected]> https://github.com/dlang/dmd/pull/13757