From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24796 invoked by alias); 17 Mar 2003 14:17:01 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 24687 invoked from network); 17 Mar 2003 14:17:01 -0000 Received: from unknown (HELO mailgate5.cinetic.de) (217.72.192.165) by sources.redhat.com with SMTP; 17 Mar 2003 14:17:01 -0000 Received: from web.de (fmomail02.dlan.cinetic.de [172.20.1.46]) by mailgate5.cinetic.de (8.11.6/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id h2HEGv302645; Mon, 17 Mar 2003 15:16:57 +0100 Date: Mon, 17 Mar 2003 14:17:00 -0000 Message-Id: <200303171416.h2HEGv302645@mailgate5.cinetic.de> MIME-Version: 1.0 Organization: http://freemail.web.de/ From: "Joerg Beyer" To: "DanielJacobowitz" Cc: gdb@sources.redhat.com Subject: Re: Re: how to access array elements? Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00251.txt.bz2 Daniel Jacobowitz 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