public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Rewrite Rust slice type handling
Date: Tue, 20 Feb 2024 13:52:11 -0700	[thread overview]
Message-ID: <87o7ca270k.fsf@tromey.com> (raw)
In-Reply-To: <20240202182017.1731887-1-tromey@adacore.com> (Tom Tromey's message of "Fri, 2 Feb 2024 11:20:17 -0700")

>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> This patch rewrites the handling of slice types in Rust.
Tom> More recent versions of the Rust compiler changed how unsized types
Tom> were emitted, letting gdb inspect them more nicely.  However, gdb did
Tom> not do this, and in fact treated all such types as if they were slices
Tom> of arrays, which is incorrect.

Tom> This patch rewrites this handling and removes the restriction that
Tom> unsized types must be array slices.  I've added a comment explaining
Tom> how unsized types are represented to rust-lang.c as well.

Tom> I looked into a different approach, namely changing the DWARF reader
Tom> to fix up slice types to have a dynamic type.  However, the approach
Tom> taken here turned out to be simpler.

Tom> Tested on x86-64 Fedora 38 with a variety of Rust compiler versions.

I'm checking this in now.

Tom

      reply	other threads:[~2024-02-20 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 18:20 Tom Tromey
2024-02-20 20:52 ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7ca270k.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).