diff options
author | Tom Tromey <tromey@adacore.com> | 2024-01-30 10:06:46 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-02-20 13:51:30 -0700 |
commit | b0dd661fa16a424f059b1e1d80e779508b1a9a12 (patch) | |
tree | 7d1c9253ab0284c90ab7859d402a7140980e23c3 /gdb/python/py-cmd.c | |
parent | 94a75b0363b1e09416e9bd24cac72d98864688d8 (diff) | |
download | binutils-b0dd661fa16a424f059b1e1d80e779508b1a9a12.zip binutils-b0dd661fa16a424f059b1e1d80e779508b1a9a12.tar.gz binutils-b0dd661fa16a424f059b1e1d80e779508b1a9a12.tar.bz2 |
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=30330
Diffstat (limited to 'gdb/python/py-cmd.c')
0 files changed, 0 insertions, 0 deletions