From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28085 invoked by alias); 8 Jun 2005 13:07:44 -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 27557 invoked by uid 22791); 8 Jun 2005 13:07:27 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 08 Jun 2005 13:07:27 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1Dg0H6-0001I5-JR; Wed, 08 Jun 2005 09:07:16 -0400 Date: Wed, 08 Jun 2005 13:07:00 -0000 From: Daniel Jacobowitz To: Wu Zhou Cc: gdb@sources.redhat.com Subject: Re: Program terminated with SIGSEGV when trying to print an array element Message-ID: <20050608130715.GA4861@nevyn.them.org> Mail-Followup-To: Wu Zhou , gdb@sources.redhat.com References: <20050607131417.GB30174@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-06/txt/msg00066.txt.bz2 On Wed, Jun 08, 2005 at 02:52:20PM +0800, Wu Zhou wrote: > Sure. But now I am having difficulty in one problem: given an struct value > with the type being TYPE_CODE_PTR, how to get the value of the array (or > string or whatever) it refer to? We need to know this to go on with the > following evaluation. I had thought that function "value_from_pointer" > will do this, but it turn out to be false. Anyone could help on this? Usually, value_ind. Do you have a pointer to a TYPE_CODE_ARRAY, or has the array decayed into a pointer (like in C)? -- Daniel Jacobowitz CodeSourcery, LLC