Re: [PATCH:MI] Return a subset of a variable object's children

Vladimir Prus
2008-05-28T07:23:22Z

On Saturday 10 May 2008 06:54:01 you wrote:
> > > > Clearly I'm not going to do either but we could simply go back to using
> > > > the linked list structures that were already in varobj.c. It's a
> > > > question of whether the convenience outweighs the handicap of having to
> > > > work with vectors all the time or not. IMHO it doesn't.
> > >
> > > I disagree, and I haven't yet seen a practical "handicap". We're not going
> > > back to hand-written data structures for MI implementation.
> >
> > Well it's a shame that convenience should dictate the type of structures that
> > are used because I can get this patch to work with an old Gdb using linked
> > lists.
>
> As you've made your decision, the patch below isn't a RFA or RFC but a record
> for the archives to ensure it's not lost like other patches that I've left
> lying around. I feel sure that one day the issue will arise again, probably
> when Eclipse finds a requirement for it.
>
> It's against current Gdb and uses the old linked lists. This means that the
> size of the data structure is only proportional to the number of children
> created and not the total number of possible children. Unlike the previous
> patch, children are listed in sequence for both creation and update. Also
> children can be deleted. Searching for a location to insert a child in the
> list is linear (as before) but I anticipate that a front end would only ever
> create a small number at any one time and delete children (that are not
> visible) if the number became too great. In any case the search could be made
> binary (O(log N)), if necessary.
>
> Oh, yes, and it's a unified diff!

I think that the current data structures surely allow to implement the behaviour
that is useful for frontends. I raise some questions about the original version
of your patch in

http://article.gmane.org/gmane.comp.gdb.patches/40676

which you did not respond to. Did you miss that email? Do you plan to have the
original version of your patch adjusted and checked in?

For the record, the usecases that I think will benefit from this new functionality
are outlined in:

http://article.gmane.org/gmane.comp.gdb.patches/40726

Thanks,
Volodya