Obtaining number of children of a dynamic varobj

Elmenthaler, Jens jens.elmenthaler@verigy.com
Thu Feb 11 09:28:00 GMT 2010


Trying to enable the python pretty printers in the Eclipse CDT, a question about the MI API for varobjs arose.

If I read the documentation correctly, I should not call -var-list-children without the range of children, because in general I should assume that the varobj has a huge number of children and fetching them all is potential too expensive.

Quite reasonable sofar. Nevertheless, I have the problem that I have to know the number of children a dynamic varobj has.

The only way I see to obtain the number of children, however, is to call -var-list-children without a range specification. I can omit the values to be transferred. Does that have the same scalability issues, after all it still creates a varobj for each child?


More information about the Gdb mailing list