From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 42DAF3858D37; Tue, 14 Jul 2020 01:52:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42DAF3858D37 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug rust/26197] rust FAILs with rustc 1.36.0 and llvm 7 Date: Tue, 14 Jul 2020 01:52:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: rust X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey 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: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 01:52:21 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26197 --- Comment #8 from Tom Tromey --- Consider the NonZeroOptimized enum from your executable <2><42c2>: Abbrev Number: 11 (DW_TAG_union_type) <42c3> DW_AT_name : (indirect string, offset: 0x2f62): NonZeroOptimized <42c7> DW_AT_byte_size : 24 <42c8> DW_AT_alignment : 8 <3><42c9>: Abbrev Number: 9 (DW_TAG_member) <42ca> DW_AT_name : (indirect string, offset: 0x26ea): RUST$ENCODED$ENUM$0$Empty <42ce> DW_AT_type : <0x42d5> <42d2> DW_AT_alignment : 8 <42d3> DW_AT_data_member_location: 0 This means that slot 0 of the value is the discriminant, where 0 means it is the empty enum "Empty", and nonzero means it is the value. However when we look at the type of the member: <2><42d5>: Abbrev Number: 8 (DW_TAG_structure_type) <42d6> DW_AT_name : (indirect string, offset: 0x2704): Value <42da> DW_AT_byte_size : 24 <42db> DW_AT_alignment : 8 <3><42dc>: Abbrev Number: 9 (DW_TAG_member) <42dd> DW_AT_name : (indirect string, offset: 0x67c): __0 <42e1> DW_AT_type : <0x44f2> <42e5> DW_AT_alignment : 8 <42e6> DW_AT_data_member_location: 0 Now we can drill down some more to see what the special __0 member's type looks like: <3><44f2>: Abbrev Number: 8 (DW_TAG_structure_type) <44f3> DW_AT_name : (indirect string, offset: 0x84c0b): String <44f7> DW_AT_byte_size : 24 <44f8> DW_AT_alignment : 8 <4><44f9>: Abbrev Number: 9 (DW_TAG_member) <44fa> DW_AT_name : (indirect string, offset: 0x2dac7): vec <44fe> DW_AT_type : <0x450b> <4502> DW_AT_alignment : 8 <4503> DW_AT_data_member_location: 0 Oops, it is a 24 byte structure type. This seems wrong to me, I'd expect a pointer type here instead, or a sequence of $0$nnn$mmm$... values to select such a field. Perhaps this is another case where that rust bug you linked to causes problems? Though you say it worked before. I can't try an older gdb right now, but I hope to get to it eventually. I wonder if it worked by accident or if assuming the whole 24 bytes is 0 is ok. --=20 You are receiving this mail because: You are on the CC list for the bug.=