From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8812 invoked by alias); 16 May 2010 17:31:01 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 8791 invoked by uid 22791); 16 May 2010 17:30:59 -0000 X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Sun, 16 May 2010 17:31:00 -0000 From: Jan Kratochvil To: Joost van der Sluis Cc: Jonas Maebe , Project Archer Subject: Re: Patch for pascal-dynamic arrays Message-ID: <20100516172301.GA4685@host0.dyn.jankratochvil.net> References: <1271071502.27845.15.camel@wsjoost.cnoc.lan> <20100412195106.GA32767@host0.dyn.jankratochvil.net> <1271241292.21465.18.camel@wsjoost.cnoc.lan> <20100506230504.GA21919@host0.dyn.jankratochvil.net> <1273874250.9996.33.camel@wsjoost.cnoc.lan> <20100514224613.GA3338@host0.dyn.jankratochvil.net> <1273955042.32006.31.camel@wsjoost.cnoc.lan> <20100515214421.GA9965@host0.dyn.jankratochvil.net> <4719101D-98D9-4000-9794-838695CDA95D@elis.ugent.be> <1274029467.5331.24.camel@wsjoost.cnoc.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1274029467.5331.24.camel@wsjoost.cnoc.lan> User-Agent: Mutt/1.5.20 (2009-08-17) X-SW-Source: 2010-q2/txt/msg00027.txt.bz2 On Sun, 16 May 2010 19:04:27 +0200, Joost van der Sluis wrote: > That's because type_length_get() (gdbtypes.c) does not return 0 when the > high and low-bound are equal to each other. That's correct. Both DW_AT_lower_bound and DW_AT_upper_bound express the boundaries inclusively. Array of length 0 must have DW_AT_upper_bound equal to DW_AT_lower_bound minus one. If you do not feel confortable with DW_AT_upper_bound that way you can also use DW_AT_lower_bound and DW_AT_count with value 0. > There's also a second problem. The lower bound is 1 for strings. With > Jonas' patch for fpc the upper bound of strings is 0 when not allocated. That looks correct. > Leading to a size of -1. That should lead to a size of 0. I am not sure where is a problem there but GDB handles non-pascal arrays of length zero right AFAIK. Thanks, Jan