[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
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.
An extension to -var-list-children may be in order.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer