[Bug rust/20367] add further Rust demangling

mark at klomp dot org sourceware-bugzilla@sourceware.org
Sun Apr 9 09:33:00 GMT 2017


Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
                 CC|                            |mark at klomp dot org

--- Comment #7 from Mark Wielaard <mark at klomp dot org> ---
I think in rust_sniff_from_mangled_name () you need to use the new
rust_is_mangled () or rust_demangle () from libiberty. See the documentation in

/* Returns non-zero iff MANGLED is a rust mangled symbol.  MANGLED must
   already have been demangled through cplus_demangle_v3.  If this function
   returns non-zero then MANGLED can be demangled (in-place) using
extern int
rust_is_mangled (const char *mangled);

/* Demangles SYM (in-place) if RUST_IS_MANGLED returned non-zero for SYM.
   If RUST_IS_MANGLED returned zero for SYM then RUST_DEMANGLE_SYM might
   replace characters that cannot be demangled with '?' and might truncate
   SYM.  After calling RUST_DEMANGLE_SYM SYM might be shorter, but never
   larger.  */
extern void
rust_demangle_sym (char *sym);

/* Demangles MANGLED if it was GNU_V3 and then RUST mangled, otherwise
   RUST_DEMANGLE_SYM.  Returns a new string that is owned by the caller.  */
extern char *
rust_demangle (const char *mangled, int options);

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Gdb-prs mailing list