From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11045 invoked by alias); 5 Oct 2009 14:43:20 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 11034 invoked by uid 22791); 5 Oct 2009 14:43:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Date: Mon, 05 Oct 2009 14:43:00 -0000 From: Jan Kratochvil To: Joost van der Sluis Cc: Project Archer Subject: Re: Patch for pascal-dynamic arrays Message-ID: <20091005144308.GA15831@host0.dyn.jankratochvil.net> References: <1252939529.28930.33.camel@wsjoost.cnoc.lan> <20090916154453.GA23913@host0.dyn.jankratochvil.net> <1254326374.2755.14.camel@wsjoost.cnoc.lan> <20091004141705.GA18527@host0.dyn.jankratochvil.net> <1254737231.3257.20.camel@wsjoost.cnoc.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1254737231.3257.20.camel@wsjoost.cnoc.lan> User-Agent: Mutt/1.5.20 (2009-08-17) X-SW-Source: 2009-q4/txt/msg00002.txt.bz2 On Mon, 05 Oct 2009 12:07:11 +0200, Joost van der Sluis wrote: > On Sun, 2009-10-04 at 16:17 +0200, Jan Kratochvil wrote: ... > > * Are the new Pascal testcase FAILures expected? If a more recent fpc is > > required the testcase should XFAIL, not FAIL. > > Yes, they need a new fpc-version (2.3.1 or higher). So the testcase should check the version (or if the seen behavior is clear it is the old version) and setup_xfail appropriately. > In principle, that information should be > removed from 'struct main_type', since the lower_bound, upper_bound and > length aren't defined for plain structures, without any address set. This is again about the question whether dynamic types should be: * fully dynamic, evaluating the bound value on each access by GDB code (it was this way in the very first VLA patch version) I was suggesting this solution in: http://sourceware.org/ml/archer/2009-q2/msg00181.html * static using check_typedef() as the current GDB codebase where a dynamic type gets instantiated into its static type variant before it gets used (this is the current VLA patch version) One needs object_address for the instantiation but not later. Your patch goes +/- the latter way by the instaniation (via field `checked_dynamics') but still it would require to change all the functions handling `struct type *' for possible arrays as even after the instantiation `struct type *' is not enough there'. Anyway if it gets regression-free I am fine with including it into archer-jankratochvil-vla in its current form (after reviewing of the regression-free form). But still for FSF GDB HEAD I would like to see introducing something like `struct dynamic_type *' evaluated dynamically and requiring object_address for it while being passed as normal `struct type *' to the legacy parts of GDB. One should not be able to interchange pre-check_typedef() and post-check_typedef() types in the code as they are two different kinds. But that is not done now. Thanks, Jan