This is the mail archive of the 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: Obtaining number of children of a dynamic varobj

Elmenthaler, Jens wrote:

> Hi,
> 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?

[Please do not ask new questions by replying to an unrelated email]

Yes, it has the same issues. If you ask GDB about the number of children of a variable, and the
variable is uninitialized, GDB might not ever return. 

- Volodya

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