Hello, this patch can be used to achieve a workaround to bug http://sourceware.org/bugzilla/show_bug.cgi?id=14363 Besides being a workaround, it also is a new feature, enabling a pretty-printer to control the pretty-printing on deeper recursion levels. The bug: Structures/classes which produce cyclic reference lead to an infinite recursion on iterating children during pretty-pretting - leading to endless print and stack-overflow on gdb print. What the patch does: Before calling the pretty-printer, py-prettyprint.c:print_children() informs the pretty-printer about the current recursion level. This is done by setting a property "level" if this property exists. Changelog: 2012-08-02 Oliver Buchtala python/py-prettyprint.c: provide current recursion level to pretty printer.