From: joerg <j.beyer@web.de>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: how to access array elements?
Date: Mon, 17 Mar 2003 23:06:00 -0000 [thread overview]
Message-ID: <3E76540D.10302@web.de> (raw)
In-Reply-To: <20030317140001.GA29110@nevyn.them.org>
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?
/*
* gdb_value_s returns an array element as value.
* val1 is the array
* val2 is the index
* rval is the result, the array element
*/
int
gdb_value_subscript (struct value *val1, struct value *val2, struct
value **rval)
yours
Joerg
next prev parent reply other threads:[~2003-03-17 23:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-17 11:02 Joerg Beyer
2003-03-17 14:00 ` Daniel Jacobowitz
2003-03-17 23:06 ` joerg [this message]
2003-03-18 0:49 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E76540D.10302@web.de \
--to=j.beyer@web.de \
--cc=drow@mvista.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).