[PATCH] Support the new ("v0") mangling scheme in rust-demangle.

Eduard-Mihai Burtescu eddyb@lyken.rs
Fri Mar 13 20:28:39 GMT 2020


This is the libiberty (mainly for binutils/gdb) counterpart of
https://github.com/alexcrichton/rustc-demangle/pull/23.

Relevant links for the new Rust mangling scheme (aka "v0"):
* Rust RFC: https://github.com/rust-lang/rfcs/pull/2603
* tracking issue: https://github.com/rust-lang/rust/issues/60705
* implementation: https://github.com/rust-lang/rust/pull/57967

This implementation includes full support for UTF-8 identifiers
via punycode, so I've included a testcase for that as well.
(Let me know if it causes any issues and I'll take it out)

Last year I've submitted several small patches to rust-demangle
in preparation for upstreaming the entire new demangler, and
feedback from that has proven useful.
For example, I started with error-handling macros, but instead
the code now has "rdm->errored = 1;" before several returns/gotos.

The patch is attached instead of inline, as it's over 1000 lines long.

Bootstrapped and tested on x86_64-unknown-linux-gnu.

Also, I have no commit access, so I'd be thankful if
someone would commit this for me if/once approved.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-the-new-v0-mangling-scheme-in-rust-demangle.patch
Type: text/x-patch
Size: 28349 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200313/c273903c/attachment-0001.bin>


More information about the Gcc-patches mailing list