From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EDBA93858C2C; Tue, 20 Feb 2024 20:57:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDBA93858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708462650; bh=zoQJqA2GODiAXkYPXa/p0+5ug6bo3fiTBfWUOd1uLmA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ut8tMFVgr6u3WM16uCGmpclxItKMGRKFIFUiPwg/6cqYR3My0fjCI51pel3gp5zTM X7kADOzLICxNnnC9vtEVaMU0rNg6YgyCFXyGnB0tlndOoZYAG9JHEZhiB7xzN9HXX2 2DKDXWL95+MJ9f2erDQyFbLQvA0bS3Az3btGrf7Q= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug rust/30330] GDB 13.1 no longer prints length of Rust slice wrappers Date: Tue, 20 Feb 2024 20:57:30 +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: cvs-commit at gcc dot gnu.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 #22 from Sourceware Commits --- The master branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db0dd661fa16a= 424f059b1e1d80e779508b1a9a12 commit b0dd661fa16a424f059b1e1d80e779508b1a9a12 Author: Tom Tromey Date: Tue Jan 30 10:06:46 2024 -0700 Rewrite Rust slice type handling This patch rewrites the handling of slice types in Rust. More recent versions of the Rust compiler changed how unsized types were emitted, letting gdb inspect them more nicely. However, gdb did not do this, and in fact treated all such types as if they were slices of arrays, which is incorrect. This patch rewrites this handling and removes the restriction that unsized types must be array slices. I've added a comment explaining how unsized types are represented to rust-lang.c as well. I looked into a different approach, namely changing the DWARF reader to fix up slice types to have a dynamic type. However, the approach taken here turned out to be simpler. Tested on x86-64 Fedora 38 with a variety of Rust compiler versions. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30330 --=20 You are receiving this mail because: You are on the CC list for the bug.=