This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb python pretty printer question


>>>>> ">" == 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]