Question

I am doing some debugging of an application that uses boost::spirit. This means that backtraces are very deep and that many of the intermediate layers have function names that take several pages to print. The length of the function names makes examining the backtrace difficult. How can I have gdb limit the length of a function name to 1 or 2 lines? I'd still like the see the full path to the file and line number, but I don't need four pages of template parameters!

Was it helpful?

Solution

I don't think it can be done directly right now. I think it would be a reasonable feature.

However, you can write your own implementation of "bt" in Python and then apply whatever transforms you like. This isn't actually very hard.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top