This is the mail archive of the
mailing list for the GDB project.
Re: Patch for allowing calling pascal-methods (fpc)
- From: Tom Tromey <tromey at redhat dot com>
- To: Joost van der Sluis <joost at cnoc dot nl>
- Cc: gdb at sourceware dot org, Pierre Free Pascal <pierre at freepascal dot org>
- Date: Wed, 19 Oct 2011 14:03:02 -0600
- Subject: Re: Patch for allowing calling pascal-methods (fpc)
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
>>>>> "Joost" == Joost van der Sluis <email@example.com> writes:
Tom> I am not sure that applying this patch is ok. It is generic code, so
Tom> this change may negatively affect other languages -- it is hard to be
Tom> sure without replicating your analysis.
Joost> Thing is that this function is only used by the Pascal parser, and
Joost> within the ada-lang.c file. So it could be useful if someone with more
Joost> ada-knowledge could have a look at it. (I did have gnat installed when
Joost> doing the test-runs)
No, there are calls to it from eval.c, e.g. for the STRUCTOP_STRUCT
case, which is emitted by the C parser.
If you can prove it does not negatively affect other languages then that
would be ok.
Joost> I could also create a wrapper-function in p-lang.c, that calls
Joost> lookup_struct_elt_type and then does the additional search within the
Joost> FN-fields. But that's very difficult (impossible?), because of the
Joost> inheritance: A field has to be searched first within it's own class, and
Joost> only if it's not found in it's base-classes.
I think a new function alongside lookup_struct_elt_type in gdbtypes.c
would be fine.