Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] Really Fixing Arrays

----- Original Message -----
From: "Daniel Jacobowitz" <drow@xxxxxxxxxx>
To: <cdt-debug-dev@xxxxxxxxxxx>
Sent: Sunday, July 20, 2003 2:06 PM
Subject: Re: [cdt-debug-dev] Really Fixing Arrays


> On Fri, Jul 18, 2003 at 10:53:23AM -0700, Chris Songer wrote:
> >
> > Hi,
> >
> > I'm motivated to fix large arrays and the variable view by doing lazy
> > retrieval of entries from GDB. My goal is that a user's request for the
> > last 128 entries of a 32k array create a request to gdb for somewhere
> > closer to 128 entries than the current request for 32k entries.
> >
> > The thing I'm not happy about is that -var-list-children does not allow
> > specification of a range of children. I don't see anything in the MI
> > documentation or code that lets me get at a variable's children in
anything
> > other than an all or nothing fashion.
> >
> > Lets presume an array int a[128]. The only thing I can find that will do
> > what I want is this:
> >
> > -var-create arraymagicunique_a_1 "*" a[1]
> > -var-evaluate-expression arraymagicunique_a_1
> >
> > Any other suggestions for how to use MI to do this?
>
> I'm not up on the MI syntax at the moment, but in the CLI you could do
> something like this: "print a[32734]@32" would give you entries 32734 -
> 32765.  Probably you can use evaluate-expression to do this also.

This could work only for simple arrays. If  the members of array are
structures the parsing is very complicated.
I like Chris's idea to create children on demand but I would like to try it.

>
> An extension to -var-list-children may be in order.

This is the best solution.

>
> --
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>

Mikhail Khodjaiants




Back to the top