I am working on a debug / memory tool. I want to display characters coming from C ++, the problem is that they are very verbose. At the moment, I just use __cxa_demangle , but this often leads to huge lines of over 500 characters due to the inclusion of default template options.
clang++ can clearly do smart things when it communicates characters, is there a way I can use it?
As a simple example, take:
std::map<std::string const, unsigned int, std::less<std::string const>, std::allocator<std::pair<std::string const, unsigned int> > >::find(std::string const&)
Which clearly could be reported as:
std::map<std::string const, unsigned int>::find(std::string const&)
.. if I had a smart enough tool. It is clear that this is difficult to do without any additional knowledge (for example, inclusions that were originally used - I can potentially get from them), but I would be grateful for any pointers.
So far I have been pointing to libcxxabi , but besides the fact that there was no open interface for parsing the tree (which would not stop me on my own), it seems that I would have to do the hard work of determining what parameters were by default. It would be great if I could somehow fool it into doing it for me.
source share