From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14149 invoked by alias); 19 Feb 2003 17:06:38 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14136 invoked from network); 19 Feb 2003 17:06:38 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 19 Feb 2003 17:06:38 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18lZZB-0006h9-00; Wed, 19 Feb 2003 13:07:37 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18lXfy-0002AG-00; Wed, 19 Feb 2003 12:06:30 -0500 Date: Wed, 19 Feb 2003 17:06:00 -0000 From: Daniel Jacobowitz To: Pierre Muller Cc: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [RFC 2nd] New file fpc-abi.c Message-ID: <20030219170630.GB7961@nevyn.them.org> Mail-Followup-To: Pierre Muller , Andrew Cagney , gdb-patches@sources.redhat.com References: <5.0.2.1.2.20030218085343.03243438@ics.u-strasbg.fr> <5.0.2.1.2.20030217180426.02227540@ics.u-strasbg.fr> <5.0.2.1.2.20030217180426.02227540@ics.u-strasbg.fr> <5.0.2.1.2.20030218085343.03243438@ics.u-strasbg.fr> <5.0.2.1.2.20030219165937.026bdc30@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.0.2.1.2.20030219165937.026bdc30@ics.u-strasbg.fr> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00415.txt.bz2 On Wed, Feb 19, 2003 at 05:38:49PM +0100, Pierre Muller wrote: > > > This is a second version of fpc-abi.c patch. > I tried to take into account all remarks I got. > > I checked all functions inside fpc-abi.c, > modified most of them, removed part of the C++ specific code, > but also left other parts, > because FPC could support such things later or because > C ++ classes might land there by error. C++ classes should not land there by error. Please don't. If you want to support debugging FPC code linked to C++ code, then eventually we will need to support different ABIs per compilation unit. Until then, the user is responsible for specifying the right one. And it's just as likely it will be GCC v3 as v2, so leaving the v2 code there is not useful. > + This program is free software; you can redistribute it and/or > + modify > + it under the terms of the GNU General Public License as published > + by Your line wrapping is all messed up. Please run this through gdb_indent.sh, and then eyeball it to make sure things look right. > +/* #include */ That should be removed. > +/* 19-02-2003: Free Pascal only knows complete destructors. */ Please use ISO dates, since they're less ambiguous. That would be 2003-02-19. > + /* We don't have an fcontext (e.g. the program was compiled with > + g++ version 1). Try to get the vtbl from the TYPE_VPTR_BASETYPE. > + This won't work right for multiple inheritance, but at least we > + should do as well as GDB 3.x did. */ Comments to g++ version 1 and GDB 3.x shouldn't be in a new file for Free Pascal support in GDB 5.4. If this code isn't appropriate for Free Pascal it should be deleted or replaced with an error. > +/* Return true if the INDEXth field of TYPE is a virtual baseclass > + pointer which is for the base class whose type is BASECLASS. > + 19-02-2003: Free Pascal does not support virtual base classes. > + Leave that code active in case a C++ class lost its way here. */ Ditto. > + /* Free Pascal does not support virtual base classes. */ > + /* First look for the virtual baseclass pointer > + in the fields. */ Then the code shouldn't be here. Would you mind fixing those and reposting it? Then I can look at the actual code more closely. I'm still thinking about the issues involved in using the "current C++ ABI" to handle "Free Pascal". I guess it'll work... -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer