From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8EEEE398B40F; Fri, 19 Feb 2021 12:08:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EEEE398B40F From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/27438] [dwz, odr, multifile] Multifile after odr not optimal Date: Fri, 19 Feb 2021 12:08:21 +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: vries at gcc dot gnu.org 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: Fri, 19 Feb 2021 12:08:21 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27438 --- Comment #2 from Tom de Vries --- The same problem exists for struct bbb, the struct containing member_four. Looking at the original file: ... $ llvm-dwarfdump ../odr-struct | grep -A3 struct | egrep -v "^--|DW_AT_byte_size" | sed 's%/home/vries/dwz/dwz.git/testsuite/dwz.tests/= %%' ../odr-struct: file format ELF64-x86-64 .debug_info contents: 0x00000000: Compile Unit: length =3D 0x0000002a version =3D 0x0002 abbr_off= set =3D 0x0000 addr_size =3D 0x08 (next unit at 0x0000002e) 0x000000f4: DW_TAG_structure_type DW_AT_name ("ccc") DW_AT_decl_file ("odr.cc") 0x00000114: DW_TAG_structure_type DW_AT_name ("aaa") DW_AT_decl_file ("odr.h") 0x00000139: DW_TAG_structure_type DW_AT_name ("bbb") DW_AT_declaration (true) 0x000001af: DW_TAG_structure_type DW_AT_name ("bbb") DW_AT_decl_file ("odr-2.cc") 0x000001cf: DW_TAG_structure_type DW_AT_name ("aaa") DW_AT_decl_file ("odr.h") 0x000001fa: DW_TAG_structure_type DW_AT_name ("ccc") DW_AT_declaration (true) ... it seems that perhaps odr-2.cc is the correct file for struct bbb, so the multifile is correct, and single-file-optimized file 1 is wrong. In other words, we can reproduce the problem without multifile mode like th= is: ... $ cp ../odr-struct 1; ../dwz 1 --odr $ llvm-dwarfdump 1 | grep -A3 struct | egrep -v "^--|DW_AT_byte_size" | sed 's%/home/vries/dwz/dwz.git/testsuite/dwz.tests/%%' 0x00000019: DW_TAG_structure_type DW_AT_name ("ccc") DW_AT_decl_file ("odr.cc") 0x0000002f: DW_TAG_structure_type DW_AT_name ("aaa") DW_AT_decl_file ("odr.h") 0x0000004b: DW_TAG_structure_type DW_AT_name ("bbb") DW_AT_decl_file ("odr.cc") ... --=20 You are receiving this mail because: You are on the CC list for the bug.=