* Re: Re: how to access array elements?
@ 2003-03-17 14:17 Joerg Beyer
2003-03-17 14:31 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Joerg Beyer @ 2003-03-17 14:17 UTC (permalink / raw)
To: DanielJacobowitz; +Cc: gdb
Daniel Jacobowitz <drow@mvista.com> schrieb am 17.03.03 15:00:15:
>
> 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 one:
struct value *value_subscript (struct value *array, struct value *idx) ?
it needs a value pointer as index. could I easily turn a int/long/... into
such a value?
I cant find a int_to_value() or something function.
Joerg
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Re: how to access array elements?
2003-03-17 14:17 Re: how to access array elements? Joerg Beyer
@ 2003-03-17 14:31 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2003-03-17 14:31 UTC (permalink / raw)
To: Joerg Beyer; +Cc: gdb
On Mon, Mar 17, 2003 at 03:16:57PM +0100, Joerg Beyer wrote:
> Daniel Jacobowitz <drow@mvista.com> schrieb am 17.03.03 15:00:15:
> >
> > 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 one:
> struct value *value_subscript (struct value *array, struct value *idx) ?
> it needs a value pointer as index. could I easily turn a int/long/... into
> such a value?
>
> I cant find a int_to_value() or something function.
value_from_longest?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-17 14:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-17 14:17 Re: how to access array elements? Joerg Beyer
2003-03-17 14:31 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).