]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Print type name when printing Rust slice
authorTom Tromey <tromey@adacore.com>
Thu, 7 Mar 2024 19:57:07 +0000 (12:57 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 2 Apr 2024 17:37:32 +0000 (11:37 -0600)
commit251cedaeb57fe1e0fd28798f476fbee75373bbf4
tree02b886a94fada4b080bf23c6dac2b8ae6401907a
parent051889c8104c3c959b903d08e9afbcb7e9670c43
Print type name when printing Rust slice

The recent change to how unsized Rust values are printed included a
small regression from past behavior.  Previously, a slice's type would
be printed, like:

    (gdb) print slice
    $80 = &[i32] [3]

The patch changed this to just

    (gdb) print slice
    $80 = [3]

This patch restores the previous behavior.

Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30330
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31517
gdb/rust-lang.c
gdb/testsuite/gdb.rust/simple.exp
gdb/testsuite/gdb.rust/unsized.exp