This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: how to access array elements?
On Tue, Mar 18, 2003 at 12:02:37AM +0100, joerg wrote:
>
>
> Daniel Jacobowitz wrote:
> >On Mon, Mar 17, 2003 at 12:02:12PM +0100, Joerg Beyer wrote:
> >
> >>Dear List Reader,
> >>
> >>while fiddeling with the gdb-sources, I want to iterate over the
> >>values of an array. I have the "struct value*"-pointer, that is a
> >>TYPE_CODE_ARRAY. How do I get value-pointers to the
> >>entries of the array?
> >
> >
> >Try value_subscript?
> >
> This function is not commented. Is this suggested comment correct?
I don't know - note that I suggested value_subscript, not
gdb_value_subscript. I guess it depends what you're doing.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer