Skip to content

Commit f42f69f

Browse files
eddybtromey
authored andcommitted
libiberty: Support the new ("v0") mangling scheme in rust-demangle
This is the libiberty (mainly for binutils/gdb) counterpart of rust-lang/rustc-demangle#23. Relevant links for the new Rust mangling scheme (aka "v0"): * Rust RFC: rust-lang/rfcs#2603 * tracking issue: rust-lang/rust#60705 * implementation: rust-lang/rust#57967 This implementation includes full support for UTF-8 identifiers via punycode, so I've included a testcase for that as well. libiberty/ChangeLog 2021-01-16 Eduard-Mihai Burtescu <eddyb@lyken.rs> * rust-demangle.c (struct rust_demangler): Add skipping_printing and bound_lifetime_depth fields. (eat): Add (v0-only). (parse_integer_62): Add (v0-only). (parse_opt_integer_62): Add (v0-only). (parse_disambiguator): Add (v0-only). (struct rust_mangled_ident): Add punycode{,_len} fields. (parse_ident): Support v0 identifiers. (print_str): Respect skipping_printing. (print_uint64): Add (v0-only). (print_uint64_hex): Add (v0-only). (print_ident): Respect skipping_printing, Support v0 identifiers. (print_lifetime_from_index): Add (v0-only). (demangle_binder): Add (v0-only). (demangle_path): Add (v0-only). (demangle_generic_arg): Add (v0-only). (demangle_type): Add (v0-only). (demangle_path_maybe_open_generics): Add (v0-only). (demangle_dyn_trait): Add (v0-only). (demangle_const): Add (v0-only). (demangle_const_uint): Add (v0-only). (basic_type): Add (v0-only). (rust_demangle_callback): Support v0 symbols. * testsuite/rust-demangle-expected: Add v0 testcases.
1 parent a6006e1 commit f42f69f

File tree

3 files changed

+1161
-11
lines changed

3 files changed

+1161
-11
lines changed

libiberty/ChangeLog

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
2021-01-16 Eduard-Mihai Burtescu <eddyb@lyken.rs>
2+
3+
* rust-demangle.c (struct rust_demangler): Add
4+
skipping_printing and bound_lifetime_depth fields.
5+
(eat): Add (v0-only).
6+
(parse_integer_62): Add (v0-only).
7+
(parse_opt_integer_62): Add (v0-only).
8+
(parse_disambiguator): Add (v0-only).
9+
(struct rust_mangled_ident): Add punycode{,_len} fields.
10+
(parse_ident): Support v0 identifiers.
11+
(print_str): Respect skipping_printing.
12+
(print_uint64): Add (v0-only).
13+
(print_uint64_hex): Add (v0-only).
14+
(print_ident): Respect skipping_printing,
15+
Support v0 identifiers.
16+
(print_lifetime_from_index): Add (v0-only).
17+
(demangle_binder): Add (v0-only).
18+
(demangle_path): Add (v0-only).
19+
(demangle_generic_arg): Add (v0-only).
20+
(demangle_type): Add (v0-only).
21+
(demangle_path_maybe_open_generics): Add (v0-only).
22+
(demangle_dyn_trait): Add (v0-only).
23+
(demangle_const): Add (v0-only).
24+
(demangle_const_uint): Add (v0-only).
25+
(basic_type): Add (v0-only).
26+
(rust_demangle_callback): Support v0 symbols.
27+
* testsuite/rust-demangle-expected: Add v0 testcases.
28+
129
2020-09-11 Felix Willgerodt <felix.willgerodt@intel.com>
230

331
Sync with GCC

0 commit comments

Comments
 (0)