cpptrace
cpptrace copied to clipboard
Explore more formatting utilities
Follow-up to #164.
Possibilities include:
-
- [ ] ~~Parameter filtering~~
-
- [ ] ~~Template parameter filtering~~
-
- [ ] ~~Some attempt to parse the function names from symbols~~
-
- [ ] Path-based filtering
-
- [x] Path shortening
Path shortening is implemented. I have also added an option to do some prettifying of symbols (things like foo(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >) -> foo(std::vector<std::string>)).
Parameter / template parameter filtering will be difficult to do in the general case and parsing function names from symbols is pretty much a lost cause in the general case, there's just too much room for divergence in implementations and there are also ambiguous cases.
I am looking at ways to separately store the symbol name alone without extra parameters etc.
Parsing function names from symbols is pretty much a lost cause in the general case, there's just too much room for divergence in implementations and there are also ambiguous cases.
I have implemented this. I think I've been able to do a pretty good job at handling everything but I'm sure there are plenty more edge cases.
I might revisit parameter / template filtering as individual options some other time. Path filtering I think might be best left to users for how they want to handle it.
I'm going to close as complete for now