This is the mail archive of the 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 <> writes:

Joost> More digging convinced me that the actual problem is in
Joost> lookup_struct_elt_type. 

Could you explain why?

I am not sure that applying this patch is ok.  It is generic code, so
this change may negatively affect other languages -- it is hard to be
sure without replicating your analysis.

Perhaps some other Pascal-specific fix would be more obviously safe.

Do you have copyright papers in place?  If not, contact me off-list to
get started.

Joost> Attached is a patch which makes it possible for gdb to call methods and
Joost> print the result. A testsuite-run did not show any regressions. The
Joost> patch also contains a test with an example.

Patches should go to gdb-patches and have a ChangeLog entry.

Joost> +      if (t_method_name && (strcmp_iw (t_method_name, name) == 0))
Joost> +	{
Joost> +          if (TYPE_FN_FIELDLIST_LENGTH(type, i) == 1)
Joost> +            {
Joost> +              return TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (type, i), 0);
Joost> +            }
Joost> +          else if (!(noerr))
Joost> +            error (_("Could not determine which %s has to be used."), name);

This seems iffy for C++.


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