Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not abort when demangling fails #167

Open
blastrock opened this issue Dec 7, 2018 · 1 comment
Open

Do not abort when demangling fails #167

blastrock opened this issue Dec 7, 2018 · 1 comment

Comments

@blastrock
Copy link

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.

@fitzgen
Copy link
Member

fitzgen commented Dec 10, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants