cpptrace icon indicating copy to clipboard operation
cpptrace copied to clipboard

Explore more formatting utilities

Open jeremy-rifkin opened this issue 9 months ago • 1 comments

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

jeremy-rifkin avatar Feb 03 '25 04:02 jeremy-rifkin

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.

jeremy-rifkin avatar Apr 22 '25 02:04 jeremy-rifkin

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.

jeremy-rifkin avatar Jun 12 '25 03:06 jeremy-rifkin

I'm going to close as complete for now

jeremy-rifkin avatar Jul 29 '25 02:07 jeremy-rifkin