]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Reimplement Rust slice printing
authorTom Tromey <tom@tromey.com>
Fri, 25 Mar 2022 19:36:53 +0000 (13:36 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 15 Apr 2022 16:34:03 +0000 (10:34 -0600)
commit506ec52e8805d8edd538d6bd11750489a8c8bbee
tree9201c10e67505609846c0a6f51ed98c033a3e3c6
parent925ea601f1892c6eb344e2c916f0ef448b42b606
Reimplement Rust slice printing

The current nightly Rust compiler (aka 1.61) added better DWARF
representation for unsized types.  Fixing this is PR rust/21466; but
the code is actually the same as what is required to make slice
printing more useful, which is PR rust/23871.  This patch implements
this.  I tested this against various Rust compilers: 1.48, current
stable, current beta, and current nightly.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21466
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23871
gdb/rust-lang.c
gdb/testsuite/gdb.rust/simple.exp
gdb/testsuite/gdb.rust/unsized.exp
gdb/testsuite/gdb.rust/unsized.rs