This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Robustifying pretty-printers
>>>>> "Vladimir" == Vladimir Prus <vladimir@codesourcery.com> writes:
Tom> -var-set-child-range 10 20
Tom> -var-list-children
Vladimir> And what children with -var-update reevaluate? From 10 to
Vladimir> 20? Or from 0 to 20? If the former, it's not very useful. If
Vladimir> the latter, then it appears that low boundary is only used
Vladimir> for -var-list-children.
Right. There is a separation between what the varobj code does
internally, and what MI reports to the FE.
-var-set-child-range affects what is reported to the FE. Only
children in that range are reported. I was assuming the same would be
true even if this were done via arguments to -var-list-children.
What happens in varobj is another matter. Currently we always fetch
children starting at 0, because the pretty-printers have a simple,
iterator-based design.
Vladimir> Maybe, it's most useful to decouple setting the range for -var-update
Vladimir> and getting specific children. So, if frontend wants more children
Vladimir> now, it will do:
Vladimir> -var-list-children 10 20
Vladimir> and if it wishes for 20 children to be fetched from now on, it will
Vladimir> explicitly do:
Vladimir> -var-set-child-limit 20
What is the difference between this and "-var-list-children 0 20"?
Tom