Вопрос

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!

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top