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: [PATCH:MI] Return a subset of a variable object's children

Nick Roberts wrote:

> This patch allows -var-list-children to create just some of a variable object's
> children.  Following a discussion last year with Mark Khouzam, this is useful
> for displaying large arrays (and structures) where it would take too long to
> create all the children: it is only really necessary to create those that are
> visible on the screen and update as further become visible.  It also allows a
> step size (stride) other than one.
> ISTR that it was said a long time ago that mi_getopt won't take long options
> but that doesn't seem to be the case.  The difficulty is that
> -var-list-children takes 0, 1 and 2 as options so I've had to separate the
> logic to keep it backward compatible.
> Use of these new options means that the elements might not be printed in order
> but it is always preserved if only the old options are used.

Thanks for working on this. Some concerns:

1. Can you please post MI patches in the unified diff format. I have troubles
groking context diff, so actual review of the code may be delayed.

2. Do we need the stride? One this feature is in, we no longer can remove it,
and if there's no pressing need we should not add it.

3. I'm not very comfortable with creating the children, and reporting them,
out-of-order. I think if I'm asking for childrem from 10 to 20, I should get
exactly the children I've asked for. If I can potentially also get children from
20 to 30, then followed by children from 10 to 20, it means the frontend will
have to do some smarts to find the new children and put them in the right place.
GDB surely know which children it created, so it can report just them.


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