Bug 919755 - DW_AT_stmt_list should have DW_FORM_data4 when cu_version < 4, otherwise DW_FORM_sec_offset
Summary: DW_AT_stmt_list should have DW_FORM_data4 when cu_version < 4, otherwise DW_F...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dwz
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-09 22:51 UTC by Mark Wielaard
Modified: 2013-03-11 11:32 UTC (History)
2 users (show)

Fixed In Version: dwz-0.10-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-11 11:32:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mark Wielaard 2013-03-09 22:51:44 UTC
Description of problem:

dwz writes out DW_AT_stmt_list with the wrong DW_FORM code for the CU version. elfutils libdw doesn't like that.

This is caused by a version check swap, fixable as follows:

diff --git a/dwz.c b/dwz.c
index 2dd0c52..9865a59 100644
--- a/dwz.c
+++ b/dwz.c
@@ -7612,7 +7612,7 @@ build_abbrevs_for_die (htab_t h, dw_cu_ref cu, dw_die_ref die,
 	  {
 	    t->attr[0].attr = DW_AT_stmt_list;
 	    t->attr[0].form = cu->cu_version < 4
-			      ? DW_FORM_sec_offset : DW_FORM_data4;
+			      ? DW_FORM_data4 : DW_FORM_sec_offset;
 	    die->die_size += 4;
 	    t->nattr++;
 	  }

Comment 1 Jakub Jelinek 2013-03-11 11:32:10 UTC
Fixed.


Note You need to log in before you can comment on or make changes to this bug.