From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17533 invoked by alias); 12 Jun 2009 21:24:25 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 17524 invoked by uid 22791); 12 Jun 2009 21:24:24 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Subject: Re: Calculating array length From: Joost van der Sluis To: archer@sourceware.org In-Reply-To: <20090607174924.GA4174@host0.dyn.jankratochvil.net> References: <1244370173.22994.14.camel@wsjoost> <20090607144745.GA21154@host0.dyn.jankratochvil.net> <1244390772.8081.39.camel@wsjoost> <20090607174924.GA4174@host0.dyn.jankratochvil.net> Content-Type: text/plain Date: Fri, 12 Jun 2009 21:24:00 -0000 Message-Id: <1244841847.11453.3.camel@wsjoost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Language-Detected: en X-Spam-Scanned: InterNLnet Mail Scan System V2.03 X-SW-Source: 2009-q2/txt/msg00154.txt.bz2 Op zondag 07-06-2009 om 19:49 uur [tijdzone +0200], schreef Jan Kratochvil: > On Sun, 07 Jun 2009 18:06:12 +0200, Joost van der Sluis wrote: > > only problems I still have is with all the > > calls to all sort of properties of the type, while the object-address is > > pointing to something different, so that the sizes don't match. > > I agree it is "unfortunate" GDB currently does not distinguish much between > the object-address and data-address and accesses them interchangeably. > > There should be both VALUE_ADDRESS and some "VALUE_DATA_ADDRESS" kept around. > > To make the VLA patch maintainable separately there is currently a function > object_address_get_data which is called at the right moment when GDB starts to > deal with the data themselves instead of the value object in general. > object_address_get_data currently switches the VALUE_ADDRESS content+meaning > to that hypothetical VALUE_DATA_ADDRESS. Yes, I found that function and used it a lot. I still have one question, though. Once CHECK_TYPEDEF is called on a type, all kind of information is stored/cached into the type-definition. Among others the bounds if it's an array. Sometimes CHECK_TYPEDEF is already called on a type with the wrong object_addres set. So I have to clear all this information from the type-definition. How can I do that? Making a new copy of the type without this information should also be ok. Regards, Joost van der Sluis