This is the mail archive of the gdb@sourceware.org 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: Patch for allowing calling pascal-methods (fpc)


>>>>> "Joost" == Joost van der Sluis <joost@cnoc.nl> 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.

Tom


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