cpp_demangle icon indicating copy to clipboard operation
cpp_demangle copied to clipboard

Do not abort when demangling fails

Open blastrock opened this issue 7 years ago • 1 comments

There are still a lot of symbols that fail demangling. This is fine as cppfilt still works better than c++filt in my opinion. However, when demangling lots of symbols in a file or stdin, cppfilt will abort on the first symbol it can't demangle.

When cppfilt encounters an symbol it can't demangle, I think it should just print it mangled, as c++filt does, and continue demangling the rest of the symbols.

blastrock avatar Dec 07 '18 09:12 blastrock

Specifically for the cppfilt example binary, correct?

This should be a fairly easy patch, if you'd like to try your hand at it! See this code: https://github.com/gimli-rs/cpp_demangle/blob/master/examples/cppfilt.rs#L48 Would probably need to write to a string before writing to stdout to ensure that if demangling fails, no half-written output goes to stdout.

fitzgen avatar Dec 10 '18 19:12 fitzgen