D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22848 - DWARF .debug_line section should be generated to conform with DW_AT_stmt_list bounds
Summary: DWARF .debug_line section should be generated to conform with DW_AT_stmt_list...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Linux
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-03-04 16:02 UTC by Luís Ferreira
Modified: 2022-03-04 21:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Luís Ferreira 2022-03-04 16:02:36 UTC
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 Dlang Bot 2022-03-04 16:05:13 UTC
@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 <contact@lsferreira.net>

https://github.com/dlang/dmd/pull/13757
Comment 2 Dlang Bot 2022-03-04 21:44:33 UTC
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 <contact@lsferreira.net>

https://github.com/dlang/dmd/pull/13757