From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2E28385803B; Wed, 20 Jan 2021 19:40:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2E28385803B From: "jakub at redhat dot com" To: dwz@sourceware.org Subject: [Bug default/27212] ./dwz: xxx: Invalid DW_AT_decl_file file number 20 Date: Wed, 20 Jan 2021 19:40:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2021 19:40:54 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27212 --- Comment #4 from Jakub Jelinek --- So, I think part of the fix should be: --- dwz.c.jj 2021-01-18 10:18:21.288726894 +0100 +++ dwz.c 2021-01-20 20:14:35.361320394 +0100 @@ -10456,7 +10456,9 @@ build_abbrevs_for_die (htab_t h, dw_cu_r case DW_FORM_data4: value =3D read_32 (ptr); break; case DW_FORM_data8: value =3D read_64 (ptr); break; case DW_FORM_udata: value =3D read_uleb128 (ptr); break; - case DW_FORM_implicit_const: break; + case DW_FORM_implicit_const: + value =3D reft->values[i]; + break; default: error (0, 0, "Unhandled %s for %s", get_DW_FORM_str (form), @@ -10465,10 +10467,12 @@ build_abbrevs_for_die (htab_t h, dw_cu_r } /* Note that the value is only used for calculating the DIE size and possibly change form. Doesn't change the - implicit_const from or value. */ + implicit_const form or value, but line_htab_lookup + needs to be called anyway, so that it records the used + file. */ + value =3D line_htab_lookup (refcu, value); if (form !=3D DW_FORM_implicit_const) { - value =3D line_htab_lookup (refcu, value); if (value <=3D 0xff) { form =3D DW_FORM_data1; But that doesn't really help to fix this completely. The problem is I think that write_abbrev is always called before write_info, and the remapping of the DW_AT_decl_file/DW_AT_call_file DW_FORM_implicit_c= onst is done only in write_die which is called either recursively or from write_info/write_types. --=20 You are receiving this mail because: You are on the CC list for the bug.=