This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Need post-processing of parameters for function calls in Ada
> > My only concern is that the Ada coerce might be relying on the C coerce
> > routine to handle the simple cases. So I might need to call the C coerce
> > routine at the end of the Ada coerce routine. I need to look deeper
> > into this.
>
> Does the existing routine do anything inappropriate for Ada? I
> suspect it is appropriate for all languages, and we can call a
> language-specific routine in addition to it. But if it does anything
> you'd rather it didn't, then we should let Ada avoid it.
I don't think it does. In fact, we are actually still calling it
after we're done with the ada_convert_actuals:
if (current_language->la_language == language_ada)
ada_convert_actuals (function, nargs, args, &sp);
{
int i;
for (i = nargs - 1; i >= 0; i--)
{
[...]
args[i] = value_arg_coerce (args[i], param_type, prototyped);
[...]
}
I am just wondering whether this is actually useful at all or not.
It depends whether value_arg_coerce covers some cases that the Ada
routine doesn't and yet needs. That's on my end to check. Worst that
would happen is that I would call the C routine from the Ada one.
Should I proceed with my proposal?
--
Joel