This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Robustifying pretty-printers
- From: Tom Tromey <tromey at redhat dot com>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 09 Jul 2009 13:13:46 -0600
- Subject: Re: Robustifying pretty-printers
- References: <200906131411.34204.vladimir@codesourcery.com> <200906161222.37208.vladimir@codesourcery.com> <m33a98p3kz.fsf@fleche.redhat.com> <200907092119.55363.vladimir@codesourcery.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Vladimir" == Vladimir Prus <vladimir@codesourcery.com> writes:
Vladimir> There's also a question how frontend will know that there
Vladimir> are more children -- so that it can show "..." in the tree
Vladimir> view, or something. The best approach would be for GDB to
Vladimir> fetch one children more, and then use emit 'has-more' field
Vladimir> in -var-list-children output. The other alternative is for
Vladimir> frontend to fetch one more item than it wishes to display --
Vladimir> but such a logic has to be repeated for each
Vladimir> frontend. Anyway, this aspect seems independent from others,
Vladimir> so I can do it myself after you are done with the code
Vladimir> changes.
I don't mind doing it.
I was thinking of a 'dynamic' attribute, to let the FE know that the
numchild attribute cannot be believed. But, I think I like your
approach better.
Vladimir> We probably need a way to explicitly reset the
Vladimir> 'remembemered' limit on elements, so that frontend is not
Vladimir> forced to display 20 elements forever.
I couldn't find a reason why you wanted the range on
-var-list-children and not as a separate command. Could you explain
why? The reason I ask is that this issue was already solved in the
old patch: you could use -var-set-child-range to set and also unset
the range.
Tom