This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb python pretty printer question
- From: Tom Tromey <tromey at redhat dot com>
- To: S Boucher <stbya at yahoo dot com>
- Cc: "gdb\ at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 05 Oct 2011 13:09:07 -0600
- Subject: Re: gdb python pretty printer question
- References: <1317249816.13778.YahooMailNeo@web161610.mail.bf1.yahoo.com>
>>>>> ">" == S Boucher <stbya@yahoo.com> writes:
>> I'm trying to use the python pretty printer functionality to to print
>> what are basically sub classes implemented in C.
[...]
>> ÂÂÂÂÂÂÂ return v.__str__()
>> Problem with that is that when v.__str__() is called to print 'b' from
>> S1, it notices that b is a S1, and we have a recursion...
>> Any way to prevent the recursion?
Nothing built-in.
I suggest just having S1Printer.to_string delegate to some other function.
Tom