From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 961133858D28; Tue, 11 Apr 2023 11:47:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 961133858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681213629; bh=rdvtCYGUk6awuNgtTPLilT8ELKw5Z0lrRx9EnZHXnbs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WIexvgV6THLkpdl/blNyJkdJX+K+rQ9bsA+pDsrHPXGwRJkuMN53GY8lq6WxvkAMP sIOHXpB25fKgYtJqEyErzYfRdptGBb4+LTXIl+cROLhSUFHIaUM+EzCCbnQqbh8sKR bAUXZ9WuOX/yifSqtArD9t4VuNROV2QjE3pBe1zs= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug rust/30330] GDB 13.1 no longer prints length of Rust slice wrappers Date: Tue, 11 Apr 2023 11:47:09 +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: 13.1 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30330 --- Comment #1 from Tom Tromey --- Apparently the intent now is to print the underlying data in the slice, not just the shape of it. However gdb stumbles over this obviously incorrect debuginfo: <2><2699>: Abbrev Number: 7 (DW_TAG_structure_type) <269a> DW_AT_name : (indirect string, offset: 0x41a): Foo<[u8]> <269e> DW_AT_byte_size : 0 <269f> DW_AT_alignment : 1 This structure does not really have a byte size of 0, because it has this member: <3><26a9>: Abbrev Number: 25 (DW_TAG_member) <26aa> DW_AT_name : (indirect string, offset: 0xff104): value <26ae> DW_AT_type : <0x23b0> <26b2> DW_AT_byte_size : 1 <26b3> DW_AT_bit_size : 0 <26b4> DW_AT_bit_offset : 8 <26b5> DW_AT_data_member_location: 0 This seems to be a rustc bug. I don't know yet if this can be worked around in a reasonable way. --=20 You are receiving this mail because: You are on the CC list for the bug.=