This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 2nd] New file fpc-abi.c


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 <ctype.h> */

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]