[gcc-10-branch] libiberty: Support the new ("v0") mangling scheme in rust-demangle

Amanieu d'Antras via Gdb-patches
2021-01-12T19:37:54Z

Rust is in the process of migrating to a new symbol mangling scheme called "v0".
Details can be found in the tracking issue:
https://github.com/rust-lang/rust/issues/60705

Demangler support for v0 has already been upstreamed in GCC's libiberty and is
available in gdb-binutils master. However we would like the demangler to be
backported to GDB 10 so that debugging experience does not regress when we
switch to generating v0 symbol names by default.

The specific GCC commit that contains the v0 Rust demangler is:
commit 84096498a7bd788599d4a7ca63543fc7c297645e
libiberty: Support the new ("v0") mangling scheme in rust-demangle

The patch applies cleanly to gdb-10-branch.