Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Joerg Beyer" <j.beyer@web.de>
To: "DanielJacobowitz" <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: Re: how to access array elements?
Date: Mon, 17 Mar 2003 14:17:00 -0000	[thread overview]
Message-ID: <200303171416.h2HEGv302645@mailgate5.cinetic.de> (raw)

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



             reply	other threads:[~2003-03-17 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17 14:17 Joerg Beyer [this message]
2003-03-17 14:31 ` 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=200303171416.h2HEGv302645@mailgate5.cinetic.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