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

UnexpectedText error when demangling a symbol #150

Closed
koute opened this issue Jul 2, 2018 · 3 comments
Closed

UnexpectedText error when demangling a symbol #150

koute opened this issue Jul 2, 2018 · 3 comments

Comments

@koute
Copy link

koute commented Jul 2, 2018

This generates an Err(UnexpectedText):

let sym = "_ZN5boost9unordered18unordered_multimapItN3xxx6xxxxxx6xxxxxx14xxxxxxxxxxxxxxENS_4hashItEESt8equal_toItESaISt4pairIKtS5_EEE7emplaceIISC_EEENS0_15iterator_detail8iteratorINS0_6detail16grouped_ptr_nodeISC_EEEEDpOT_";
println!( "{:?}", cpp_demangle::Symbol::new( sym ) );

Using c++filt works:

boost::unordered::iterator_detail::iterator<boost::unordered::detail::grouped_ptr_node<std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx> > > boost::unordered::unordered_multimap<unsigned short, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx, boost::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx> > >::emplace<std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx> >(std::pair<unsigned short const, xxx::xxxxxx::xxxxxx::xxxxxxxxxxxxxx>&&)
@fitzgen
Copy link
Member

fitzgen commented Jul 2, 2018

Thanks for the bug report, @koute !

@koute
Copy link
Author

koute commented Jul 3, 2018

Another one; may or may not be related:

_ZNSt6vectorIN3xxx6xxxxxx15xxxxxxxxxxxxxxxESaIS2_EE12emplace_backIIS2_EEEvDpOT_

should decode as:

void std::vector<xxx::xxxxxx::xxxxxxxxxxxxxxx, std::allocator<xxx::xxxxxx::xxxxxxxxxxxxxxx> >::emplace_back<xxx::xxxxxx::xxxxxxxxxxxxxxx>(xxx::xxxxxx::xxxxxxxxxxxxxxx&&)

Saldivarcher added a commit to Saldivarcher/cpp_demangle that referenced this issue Aug 6, 2018
which is just a simple fix for TemplateArg.
fitzgen added a commit that referenced this issue Aug 8, 2018
@fitzgen
Copy link
Member

fitzgen commented Aug 8, 2018

Fixed in #152!

@fitzgen fitzgen closed this as completed Aug 8, 2018
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